home *** CD-ROM | disk | FTP | other *** search
Unknown | 2000-08-16 | 13.0 KB |
open in:
MacOS 8.1
|
Win98
|
DOS
view JSON data
|
view as text
This file was not able to be converted.
This format is not currently supported by dexvert.
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 3b 20 44 65 73 63 72 69 | 70 74 69 6f 6e 3a 20 20 |; Descri|ption: |
|00000010| 48 6f 77 20 74 6f 20 75 | 73 65 20 68 6f 6f 6b 73 |How to u|se hooks|
|00000020| 20 69 6e 20 42 6c 69 74 | 7a 2e 20 54 68 69 73 20 | in Blit|z. This |
|00000030| 6f 6e 65 20 69 73 20 61 | 6e 20 65 78 61 6d 70 6c |one is a|n exampl|
|00000040| 65 20 66 6f 72 20 74 68 | 65 20 41 53 4c 00 3b 20 |e for th|e ASL.; |
|00000050| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 73 63 | | sc|
|00000060| 72 65 65 6e 6d 6f 64 65 | 20 72 65 71 75 65 73 74 |reenmode| request|
|00000070| 65 72 20 61 6e 64 20 69 | 74 20 77 6f 72 6b 73 2e |er and i|t works.|
|00000080| 20 57 6f 72 6b 69 6e 67 | 20 70 61 72 74 73 20 62 | Working| parts b|
|00000090| 79 20 50 61 75 6c 20 22 | 4d 69 6c 64 72 65 64 22 |y Paul "|Mildred"|
|000000a0| 00 3b 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |.; | |
|000000b0| 20 57 65 73 74 2e 00 3b | 20 20 20 20 20 20 20 20 | West..;| |
|000000c0| 20 20 20 20 20 20 20 59 | 6f 75 20 6e 65 65 64 20 | Y|ou need |
|000000d0| 61 6d 69 67 61 6c 69 62 | 73 2e 72 65 73 20 72 65 |amigalib|s.res re|
|000000e0| 73 69 64 65 6e 74 2e 00 | 3b 00 3b 20 20 20 20 20 |sident..|;.; |
|000000f0| 20 20 20 20 20 20 20 20 | 20 20 4e 6f 74 65 20 74 | | Note t|
|00000100| 68 61 74 20 73 6f 6d 65 | 20 74 68 69 6e 67 73 20 |hat some| things |
|00000110| 61 72 65 6e 27 74 20 65 | 78 70 6c 61 69 6e 65 64 |aren't e|xplained|
|00000120| 20 66 75 6c 6c 79 20 28 | 69 2e 65 2e 20 74 68 65 | fully (|i.e. the|
|00000130| 20 74 61 67 73 00 3b 20 | 20 20 20 20 20 20 20 20 | tags.; | |
|00000140| 20 20 20 20 20 20 66 6f | 72 20 74 68 65 20 73 63 | fo|r the sc|
|00000150| 72 65 65 6e 6d 6f 64 65 | 20 72 65 71 75 65 73 74 |reenmode| request|
|00000160| 65 72 29 2e 20 59 6f 75 | 20 73 68 6f 75 6c 64 20 |er). You| should |
|00000170| 6c 6f 6f 6b 20 61 74 20 | 74 68 65 20 41 75 74 6f |look at |the Auto|
|00000180| 64 6f 63 73 00 3b 20 20 | 20 20 20 20 20 20 20 20 |docs.; | |
|00000190| 20 20 20 20 20 66 6f 72 | 20 74 68 65 73 65 2e 00 | for| these..|
|000001a0| 3b 00 3b 20 54 79 70 65 | 3a 20 20 20 20 20 20 20 |;.; Type|: |
|000001b0| 20 20 53 59 53 54 45 4d | 00 3b 00 3b 20 41 75 74 | SYSTEM|.;.; Aut|
|000001c0| 68 6f 72 3a 20 20 20 20 | 20 20 20 44 61 76 69 64 |hor: | David|
|000001d0| 20 4d 63 4d 69 6e 6e 20 | 28 64 61 76 65 40 73 61 | McMinn |(dave@sa|
|000001e0| 74 61 6e 69 63 64 72 65 | 61 6d 73 2e 63 6f 6d 29 |tanicdre|ams.com)|
|000001f0| 00 3b 00 3b 20 52 65 71 | 75 69 72 65 73 3a 20 20 |.;.; Req|uires: |
|00000200| 20 20 20 61 6d 69 67 61 | 6c 69 62 73 2e 72 65 73 | amiga|libs.res|
|00000210| 00 3b 00 3b 20 48 69 73 | 74 6f 72 79 3a 00 3b 20 |.;.; His|tory:.; |
|00000220| 20 20 31 36 20 41 75 67 | 20 31 39 39 39 20 4d 61 | 16 Aug| 1999 Ma|
|00000230| 64 65 20 74 68 65 20 68 | 69 67 68 20 6c 65 76 65 |de the h|igh leve|
|00000240| 6c 20 66 75 6e 63 74 69 | 6f 6e 20 63 6f 6e 66 6f |l functi|on confo|
|00000250| 72 6d 20 74 6f 20 61 20 | 6d 6f 72 65 20 73 74 61 |rm to a |more sta|
|00000260| 6e 64 61 72 64 20 61 70 | 70 72 6f 61 63 68 20 77 |ndard ap|proach w|
|00000270| 69 74 68 20 74 68 65 20 | 70 61 72 61 6d 65 74 65 |ith the |paramete|
|00000280| 72 73 00 3b 20 20 20 20 | 20 20 20 20 20 20 20 20 |rs.; | |
|00000290| 20 20 20 41 64 64 65 64 | 20 62 69 67 20 65 78 70 | Added| big exp|
|000002a0| 6c 61 6e 61 74 69 6f 6e | 00 3b 20 20 20 32 30 20 |lanation|.; 20 |
|000002b0| 4f 63 74 20 31 39 39 39 | 20 52 65 6d 6f 76 65 64 |Oct 1999| Removed|
|000002c0| 20 74 68 65 20 70 6f 69 | 6e 74 6c 65 73 73 20 4c | the poi|ntless L|
|000002d0| 45 41 20 66 72 6f 6d 20 | 74 68 65 20 68 6f 6f 6b |EA from |the hook|
|000002e0| 20 28 49 27 6d 20 73 75 | 72 65 20 69 74 20 75 73 | (I'm su|re it us|
|000002f0| 65 64 20 74 6f 20 63 72 | 61 73 68 20 77 68 65 6e |ed to cr|ash when|
|00000300| 20 49 20 75 73 65 64 20 | 4a 53 52 20 36 28 61 33 | I used |JSR 6(a3|
|00000310| 29 3f 3f 3f 29 00 3b 20 | 20 20 20 20 20 20 20 20 |)???).; | |
|00000320| 20 20 20 20 20 20 47 6c | 6f 62 61 6c 20 76 61 72 | Gl|obal var|
|00000330| 69 61 62 6c 65 20 62 61 | 73 65 20 69 73 20 6e 6f |iable ba|se is no|
|00000340| 77 20 73 74 6f 72 65 64 | 20 69 6e 20 73 6f 6d 65 |w stored| in some|
|00000350| 20 72 65 73 65 72 76 65 | 64 20 6d 65 6d 6f 72 79 | reserve|d memory|
|00000360| 2c 20 6e 6f 74 20 74 68 | 65 20 68 5f 55 73 65 72 |, not th|e h_User|
|00000370| 44 61 74 61 20 66 69 65 | 6c 64 00 3b 00 3b 20 20 |Data fie|ld.;.; |
|00000380| 20 3f 3f 20 3f 3f 3f 20 | 3f 3f 3f 3f 20 57 72 69 | ?? ??? |???? Wri|
|00000390| 74 74 65 6e 2e 20 54 68 | 61 6e 6b 73 20 74 6f 20 |tten. Th|anks to |
|000003a0| 50 61 75 6c 20 57 65 73 | 74 20 77 68 6f 20 67 6f |Paul Wes|t who go|
|000003b0| 74 20 69 74 20 77 6f 72 | 6b 69 6e 67 20 28 52 75 |t it wor|king (Ru|
|000003c0| 6e 65 72 72 73 6f 66 66 | 2f 6f 6e 20 61 6e 64 20 |nerrsoff|/on and |
|000003d0| 6a 75 6d 70 20 74 6f 20 | 6c 61 62 65 6c 2b 36 29 |jump to |label+6)|
|000003e0| 00 3b 00 00 00 3b 20 48 | 4f 4f 4b 20 45 58 50 4c |.;...; H|OOK EXPL|
|000003f0| 41 4e 41 54 49 4f 4e 00 | 3b 20 3d 3d 3d 3d 3d 3d |ANATION.|; ======|
|00000400| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 00 00 00 3b 41 20 |========|==...;A |
|00000410| 68 6f 6f 6b 20 69 73 20 | 73 69 6d 70 6c 79 20 61 |hook is |simply a|
|00000420| 20 66 75 6e 63 74 69 6f | 6e 20 74 68 61 74 20 79 | functio|n that y|
|00000430| 6f 75 20 68 61 76 65 20 | 77 72 69 74 74 65 6e 20 |ou have |written |
|00000440| 74 6f 20 65 78 74 65 6e | 64 20 74 68 65 20 61 62 |to exten|d the ab|
|00000450| 69 6c 69 74 69 65 73 20 | 6f 66 20 61 6e 00 3b 4f |ilities |of an.;O|
|00000460| 53 20 66 75 6e 63 74 69 | 6f 6e 2c 20 63 6f 6d 62 |S functi|on, comb|
|00000470| 69 6e 65 64 20 77 69 74 | 68 20 61 20 48 6f 6f 6b |ined wit|h a Hook|
|00000480| 20 6e 65 77 74 79 70 65 | 20 77 68 69 63 68 20 63 | newtype| which c|
|00000490| 6f 6e 74 61 69 6e 73 20 | 69 6e 66 6f 72 6d 61 74 |ontains |informat|
|000004a0| 69 6f 6e 20 61 62 6f 75 | 74 00 3b 63 61 6c 6c 69 |ion abou|t.;calli|
|000004b0| 6e 67 20 74 68 65 20 68 | 6f 6f 6b 20 66 75 6e 63 |ng the h|ook func|
|000004c0| 74 69 6f 6e 2e 00 3b 00 | 3b 4e 6f 72 6d 61 6c 6c |tion..;.|;Normall|
|000004d0| 79 2c 20 79 6f 75 20 70 | 61 73 73 20 74 68 65 20 |y, you p|ass the |
|000004e0| 61 64 64 72 65 73 73 20 | 6f 66 20 74 68 65 20 48 |address |of the H|
|000004f0| 6f 6f 6b 20 6e 65 77 74 | 79 70 65 20 69 6e 20 61 |ook newt|ype in a|
|00000500| 20 54 61 67 4c 69 73 74 | 20 28 64 6f 20 79 6f 75 | TagList| (do you|
|00000510| 20 6b 6e 6f 77 00 3b 61 | 62 6f 75 74 20 54 61 67 | know.;a|bout Tag|
|00000520| 4c 69 73 74 73 3f 29 20 | 74 6f 20 74 68 65 20 4f |Lists?) |to the O|
|00000530| 53 20 66 75 6e 63 74 69 | 6f 6e 20 61 6e 64 20 79 |S functi|on and y|
|00000540| 6f 75 72 20 66 75 6e 63 | 74 69 6f 6e 20 77 69 6c |our func|tion wil|
|00000550| 6c 20 67 65 74 20 63 61 | 6c 6c 65 64 20 62 79 20 |l get ca|lled by |
|00000560| 74 68 65 20 4f 53 00 3b | 66 75 6e 63 74 69 6f 6e |the OS.;|function|
|00000570| 2e 00 3b 00 3b 49 6e 20 | 74 68 65 20 48 6f 6f 6b |..;.;In |the Hook|
|00000580| 20 6e 65 77 74 79 70 65 | 20 79 6f 75 27 6c 6c 20 | newtype| you'll |
|00000590| 66 69 6e 64 20 73 6f 6d | 65 74 68 69 6e 67 20 6c |find som|ething l|
|000005a0| 69 6b 65 20 74 68 69 73 | 3a 00 3b 00 3b 4e 45 57 |ike this|:.;.;NEW|
|000005b0| 54 59 50 45 20 48 6f 6f | 6b 00 3b 20 68 5f 4d 69 |TYPE Hoo|k.; h_Mi|
|000005c0| 6e 4e 6f 64 65 2e 4d 69 | 6e 4e 6f 64 65 00 3b 20 |nNode.Mi|nNode.; |
|000005d0| 2a 68 5f 45 6e 74 72 79 | 2e 6c 00 3b 20 2a 68 5f |*h_Entry|.l.; *h_|
|000005e0| 53 75 62 45 6e 74 72 79 | 2e 6c 00 3b 20 2a 68 5f |SubEntry|.l.; *h_|
|000005f0| 44 61 74 61 2e 6c 00 3b | 45 4e 44 20 4e 45 57 54 |Data.l.;|END NEWT|
|00000600| 59 50 45 00 3b 00 3b 00 | 3b 59 6f 75 20 64 6f 6e |YPE.;.;.|;You don|
|00000610| 27 74 20 72 65 61 6c 6c | 79 20 6e 65 65 64 20 74 |'t reall|y need t|
|00000620| 6f 20 62 6f 74 68 65 72 | 20 61 62 6f 75 74 20 74 |o bother| about t|
|00000630| 68 65 20 68 5f 4d 69 6e | 4e 6f 64 65 20 66 69 65 |he h_Min|Node fie|
|00000640| 6c 64 2e 00 3b 00 3b 00 | 3b 54 68 65 20 68 5f 45 |ld..;.;.|;The h_E|
|00000650| 6e 74 72 79 20 66 69 65 | 6c 64 20 69 73 20 74 68 |ntry fie|ld is th|
|00000660| 65 20 61 64 64 72 65 73 | 73 20 6f 66 20 74 68 65 |e addres|s of the|
|00000670| 20 72 6f 75 74 69 6e 65 | 20 77 68 69 63 68 20 67 | routine| which g|
|00000680| 65 74 73 20 63 61 6c 6c | 65 64 20 62 79 20 74 68 |ets call|ed by th|
|00000690| 65 20 4f 53 00 3b 66 75 | 6e 63 74 69 6f 6e 2e 20 |e OS.;fu|nction. |
|000006a0| 50 61 72 61 6d 65 74 65 | 72 73 20 61 72 65 20 70 |Paramete|rs are p|
|000006b0| 61 73 73 65 64 20 74 6f | 20 74 68 69 73 20 72 6f |assed to| this ro|
|000006c0| 75 74 69 6e 65 20 69 6e | 20 74 68 65 20 66 6f 6c |utine in| the fol|
|000006d0| 6c 6f 77 69 6e 67 20 72 | 65 67 69 73 74 65 72 73 |lowing r|egisters|
|000006e0| 3a 00 3b 20 20 61 30 20 | 2d 20 70 6f 69 6e 74 65 |:.; a0 |- pointe|
|000006f0| 72 20 74 6f 20 74 68 65 | 20 48 6f 6f 6b 20 6e 65 |r to the| Hook ne|
|00000700| 77 74 79 70 65 20 69 74 | 73 65 6c 66 00 3b 20 20 |wtype it|self.; |
|00000710| 61 31 20 2d 20 70 6f 69 | 6e 74 65 72 20 74 6f 20 |a1 - poi|nter to |
|00000720| 70 61 72 61 6d 65 74 65 | 72 20 73 74 72 75 63 74 |paramete|r struct|
|00000730| 75 72 65 20 28 22 6d 65 | 73 73 61 67 65 22 29 2e |ure ("me|ssage").|
|00000740| 00 3b 20 20 61 32 20 2d | 20 48 6f 6f 6b 20 73 70 |.; a2 -| Hook sp|
|00000750| 65 63 69 66 69 63 20 61 | 64 64 72 65 73 73 20 64 |ecific a|ddress d|
|00000760| 61 74 61 20 28 22 6f 62 | 6a 65 63 74 22 29 2e 00 |ata ("ob|ject")..|
|00000770| 3b 54 68 65 20 75 73 65 | 20 6f 66 20 74 68 6f 73 |;The use| of thos|
|00000780| 65 20 6c 61 73 74 20 74 | 77 6f 20 64 65 70 65 6e |e last t|wo depen|
|00000790| 64 20 6f 6e 20 77 68 61 | 74 20 4f 53 20 66 75 6e |d on wha|t OS fun|
|000007a0| 63 74 69 6f 6e 20 79 6f | 75 20 61 72 65 20 65 78 |ction yo|u are ex|
|000007b0| 74 65 6e 64 69 6e 67 2e | 00 3b 00 3b 00 3b 4f 62 |tending.|.;.;.;Ob|
|000007c0| 76 69 6f 75 73 6c 79 2c | 20 62 65 63 61 75 73 65 |viously,| because|
|000007d0| 20 77 65 20 61 72 65 20 | 75 73 69 6e 67 20 61 20 | we are |using a |
|000007e0| 68 69 67 68 20 6c 65 76 | 65 6c 20 6c 61 6e 67 75 |high lev|el langu|
|000007f0| 61 67 65 2c 20 77 65 20 | 77 61 6e 74 20 74 6f 20 |age, we |want to |
|00000800| 77 72 69 74 65 20 6f 75 | 72 20 68 6f 6f 6b 00 3b |write ou|r hook.;|
|00000810| 66 75 6e 63 74 69 6f 6e | 20 69 6e 20 42 6c 69 74 |function| in Blit|
|00000820| 7a 2e 20 54 68 65 20 73 | 74 61 6e 64 61 72 64 20 |z. The s|tandard |
|00000830| 77 61 79 20 6f 66 20 68 | 61 76 69 6e 67 20 74 68 |way of h|aving th|
|00000840| 65 20 70 61 72 61 6d 65 | 74 65 72 73 20 6c 61 79 |e parame|ters lay|
|00000850| 65 64 20 6f 75 74 20 69 | 6e 20 74 68 65 00 3b 68 |ed out i|n the.;h|
|00000860| 69 67 68 20 6c 65 76 65 | 6c 20 6c 61 6e 67 75 61 |igh leve|l langua|
|00000870| 67 65 20 66 75 6e 63 74 | 69 6f 6e 20 69 73 3a 00 |ge funct|ion is:.|
|00000880| 3b 20 20 20 20 46 75 6e | 63 74 69 6f 6e 7b 48 6f |; Fun|ction{Ho|
|00000890| 6f 6b 2c 20 6f 62 6a 65 | 63 74 2c 20 6d 65 73 73 |ok, obje|ct, mess|
|000008a0| 61 67 65 7d 00 3b 4e 6f | 74 65 20 74 68 65 20 6f |age}.;No|te the o|
|000008b0| 72 64 65 72 20 6f 66 20 | 70 61 72 61 6d 65 74 65 |rder of |paramete|
|000008c0| 72 73 20 2d 20 4e 4f 54 | 20 69 6e 20 6f 72 64 65 |rs - NOT| in orde|
|000008d0| 72 20 61 30 2c 61 31 2c | 61 32 21 20 54 68 69 73 |r a0,a1,|a2! This|
|000008e0| 20 67 69 76 65 73 20 75 | 73 20 61 20 70 72 6f 62 | gives u|s a prob|
|000008f0| 6c 65 6d 00 3b 73 69 6e | 63 65 20 42 6c 69 74 7a |lem.;sin|ce Blitz|
|00000900| 20 66 75 6e 63 74 69 6f | 6e 73 20 63 61 6e 6e 6f | functio|ns canno|
|00000910| 74 20 74 61 6b 65 20 70 | 61 72 61 6d 65 74 65 72 |t take p|arameter|
|00000920| 73 20 69 6e 20 61 64 64 | 72 65 73 73 20 72 65 67 |s in add|ress reg|
|00000930| 69 73 74 65 72 73 2e 20 | 54 68 69 73 20 69 73 20 |isters. |This is |
|00000940| 77 68 61 74 00 3b 74 68 | 65 20 68 5f 53 75 62 45 |what.;th|e h_SubE|
|00000950| 6e 74 72 79 20 66 69 65 | 6c 64 20 69 73 20 66 6f |ntry fie|ld is fo|
|00000960| 72 2e 20 59 6f 75 20 6d | 61 6b 65 20 74 68 65 20 |r. You m|ake the |
|00000970| 68 5f 53 75 62 45 6e 74 | 72 79 20 66 69 65 6c 64 |h_SubEnt|ry field|
|00000980| 20 70 6f 69 6e 74 20 74 | 6f 20 74 68 65 20 68 69 | point t|o the hi|
|00000990| 67 68 00 3b 6c 65 76 65 | 6c 20 6c 61 6e 67 75 61 |gh.;leve|l langua|
|000009a0| 67 65 20 66 75 6e 63 74 | 69 6f 6e 20 79 6f 75 20 |ge funct|ion you |
|000009b0| 68 61 76 65 20 77 72 69 | 74 74 65 6e 20 61 73 20 |have wri|tten as |
|000009c0| 74 68 65 20 68 6f 6f 6b | 20 66 75 6e 63 74 69 6f |the hook| functio|
|000009d0| 6e 2e 20 59 6f 75 20 74 | 68 65 6e 20 6d 61 6b 65 |n. You t|hen make|
|000009e0| 20 74 68 65 00 3b 68 5f | 45 6e 74 72 79 20 66 69 | the.;h_|Entry fi|
|000009f0| 65 6c 64 20 70 6f 69 6e | 74 20 74 6f 20 61 20 73 |eld poin|t to a s|
|00000a00| 6d 61 6c 6c 20 61 73 73 | 65 6d 62 6c 79 20 6c 61 |mall ass|embly la|
|00000a10| 6e 67 75 61 67 65 20 72 | 6f 75 74 69 6e 65 20 77 |nguage r|outine w|
|00000a20| 68 69 63 68 20 70 75 74 | 73 20 74 68 65 00 3b 70 |hich put|s the.;p|
|00000a30| 61 72 61 6d 65 74 65 72 | 73 20 69 6e 20 74 68 65 |arameter|s in the|
|00000a40| 20 63 6f 72 72 65 63 74 | 20 70 6c 61 63 65 20 61 | correct| place a|
|00000a50| 6e 64 20 63 61 6c 6c 73 | 20 74 68 65 20 72 6f 75 |nd calls| the rou|
|00000a60| 74 69 6e 65 20 70 6f 69 | 6e 74 65 64 20 74 6f 20 |tine poi|nted to |
|00000a70| 62 79 20 74 68 65 00 3b | 68 5f 53 75 62 45 6e 74 |by the.;|h_SubEnt|
|00000a80| 72 79 20 66 69 65 6c 64 | 2e 00 3b 00 3b 00 3b 54 |ry field|..;.;.;T|
|00000a90| 68 65 20 68 5f 44 61 74 | 61 20 66 69 65 6c 64 20 |he h_Dat|a field |
|00000aa0| 69 73 20 66 6f 72 20 75 | 73 65 72 20 75 73 65 20 |is for u|ser use |
|00000ab0| 61 6e 64 20 63 61 6e 20 | 62 65 20 61 6e 79 74 68 |and can |be anyth|
|00000ac0| 69 6e 67 20 79 6f 75 20 | 77 61 6e 74 2c 20 66 6f |ing you |want, fo|
|00000ad0| 72 20 65 78 61 6d 70 6c | 65 20 69 66 00 3b 79 6f |r exampl|e if.;yo|
|00000ae0| 75 20 6e 65 65 64 65 64 | 20 74 6f 20 70 61 73 73 |u needed| to pass|
|00000af0| 20 65 78 74 72 61 20 64 | 61 74 61 20 73 74 72 75 | extra d|ata stru|
|00000b00| 63 74 75 72 65 73 20 74 | 6f 20 74 68 65 20 68 6f |ctures t|o the ho|
|00000b10| 6f 6b 20 66 75 6e 63 74 | 69 6f 6e 20 79 6f 75 20 |ok funct|ion you |
|00000b20| 63 6f 75 6c 64 20 73 65 | 74 20 75 70 20 61 00 3b |could se|t up a.;|
|00000b30| 70 6f 69 6e 74 65 72 20 | 74 6f 20 74 68 6f 73 65 |pointer |to those|
|00000b40| 20 68 65 72 65 2e 00 3b | 00 3b 00 3b 54 68 65 72 | here..;|.;.;Ther|
|00000b50| 65 20 61 72 65 20 61 64 | 64 69 74 69 6f 6e 61 6c |e are ad|ditional|
|00000b60| 20 70 72 6f 62 6c 65 6d | 73 20 75 73 69 6e 67 20 | problem|s using |
|00000b70| 68 6f 6f 6b 20 66 75 6e | 63 74 69 6f 6e 73 20 69 |hook fun|ctions i|
|00000b80| 6e 20 42 6c 69 74 7a 2e | 20 4f 6e 65 20 69 73 20 |n Blitz.| One is |
|00000b90| 74 68 61 74 20 79 6f 75 | 00 3b 63 61 6e 6e 6f 74 |that you|.;cannot|
|00000ba0| 20 62 65 20 67 75 61 72 | 75 6e 74 65 65 64 20 61 | be guar|unteed a|
|00000bb0| 62 6f 75 74 20 74 68 65 | 20 63 6f 6e 74 65 6e 74 |bout the| content|
|00000bc0| 73 20 6f 66 20 74 68 65 | 20 61 64 64 72 65 73 73 |s of the| address|
|00000bd0| 20 72 65 67 69 73 74 65 | 72 20 74 68 61 74 20 69 | registe|r that i|
|00000be0| 73 20 75 73 65 64 20 74 | 6f 00 3b 61 63 63 65 73 |s used t|o.;acces|
|00000bf0| 73 20 79 6f 75 72 20 67 | 6c 6f 62 61 6c 20 76 61 |s your g|lobal va|
|00000c00| 72 69 61 62 6c 65 73 20 | 28 61 35 29 2e 20 54 68 |riables |(a5). Th|
|00000c10| 69 73 20 6d 65 61 6e 73 | 20 20 74 68 61 74 20 79 |is means| that y|
|00000c20| 6f 75 20 6d 75 73 74 20 | 73 74 6f 72 65 20 69 74 |ou must |store it|
|00000c30| 20 73 6f 6d 65 77 68 65 | 72 65 00 3b 62 65 66 6f | somewhe|re.;befo|
|00000c40| 72 65 20 63 61 6c 6c 69 | 6e 67 20 61 6e 79 20 68 |re calli|ng any h|
|00000c50| 6f 6f 6b 73 2c 20 61 6e | 64 20 72 65 73 74 6f 72 |ooks, an|d restor|
|00000c60| 65 20 69 74 20 62 65 66 | 6f 72 65 20 79 6f 75 20 |e it bef|ore you |
|00000c70| 63 61 6c 6c 20 74 68 65 | 20 42 6c 69 74 7a 20 66 |call the| Blitz f|
|00000c80| 75 6e 63 74 69 6f 6e 2e | 00 3b 41 6e 6f 74 68 65 |unction.|.;Anothe|
|00000c90| 72 20 69 73 20 74 68 61 | 74 20 74 68 65 20 42 6c |r is tha|t the Bl|
|00000ca0| 69 74 7a 20 64 65 62 75 | 67 67 65 72 20 64 6f 65 |itz debu|gger doe|
|00000cb0| 73 20 6e 6f 74 20 6c 69 | 6b 65 20 62 65 69 6e 67 |s not li|ke being|
|00000cc0| 20 75 73 65 64 20 69 6e | 73 69 64 65 20 66 75 6e | used in|side fun|
|00000cd0| 63 74 69 6f 6e 73 00 3b | 77 68 69 63 68 20 68 61 |ctions.;|which ha|
|00000ce0| 76 65 20 62 65 65 6e 20 | 63 61 6c 6c 65 64 20 66 |ve been |called f|
|00000cf0| 72 6f 6d 20 61 20 68 6f | 6f 6b 2c 20 73 6f 20 79 |rom a ho|ok, so y|
|00000d00| 6f 75 20 6e 65 65 64 20 | 74 6f 20 70 75 74 20 52 |ou need |to put R|
|00000d10| 75 6e 45 72 72 73 4f 66 | 66 2e 2e 2e 2e 52 75 6e |unErrsOf|f....Run|
|00000d20| 45 72 72 73 4f 6e 00 3b | 61 72 6f 75 6e 64 20 74 |ErrsOn.;|around t|
|00000d30| 68 65 20 66 75 6e 63 74 | 69 6f 6e 2e 00 3b 00 3b |he funct|ion..;.;|
|00000d40| 00 3b 41 20 70 69 65 63 | 65 20 6f 66 20 61 73 73 |.;A piec|e of ass|
|00000d50| 65 6d 62 6c 79 20 6c 61 | 6e 67 75 61 67 65 20 77 |embly la|nguage w|
|00000d60| 68 69 63 68 20 79 6f 75 | 20 63 61 6e 20 75 73 65 |hich you| can use|
|00000d70| 20 74 6f 20 70 75 74 20 | 74 68 65 20 70 61 72 61 | to put |the para|
|00000d80| 6d 65 74 65 72 73 20 69 | 6e 20 74 68 65 00 3b 63 |meters i|n the.;c|
|00000d90| 6f 72 72 65 63 74 20 6f | 72 64 65 72 20 61 6e 64 |orrect o|rder and|
|00000da0| 20 63 61 6c 6c 20 74 68 | 65 20 42 6c 69 74 7a 20 | call th|e Blitz |
|00000db0| 66 75 6e 63 74 69 6f 6e | 20 69 73 20 74 68 69 73 |function| is this|
|00000dc0| 20 28 74 68 69 73 20 69 | 73 20 77 68 61 74 20 79 | (this i|s what y|
|00000dd0| 6f 75 20 77 6f 75 6c 64 | 20 6d 61 6b 65 00 3b 74 |ou would| make.;t|
|00000de0| 68 65 20 68 5f 45 6e 74 | 72 79 20 66 69 65 6c 64 |he h_Ent|ry field|
|00000df0| 20 70 6f 69 6e 74 20 74 | 6f 29 3a 00 3b 00 3b 5f | point t|o):.;.;_|
|00000e00| 68 6f 6f 6b 45 6e 74 72 | 79 3a 00 3b 20 20 20 20 |hookEntr|y:.; |
|00000e10| 6d 6f 76 65 6d 2e 6c 20 | 64 32 2f 61 35 2c 2d 28 |movem.l |d2/a5,-(|
|00000e20| 61 37 29 20 20 20 20 20 | 20 20 3b 20 50 72 65 73 |a7) | ; Pres|
|00000e30| 65 72 76 65 20 6e 6f 6e | 2d 73 63 72 61 74 63 68 |erve non|-scratch|
|00000e40| 20 72 65 67 69 73 74 65 | 72 73 20 77 65 20 61 6c | registe|rs we al|
|00000e50| 74 65 72 00 3b 20 20 20 | 20 6d 6f 76 65 2e 6c 20 |ter.; | move.l |
|00000e60| 20 61 31 2c 64 32 20 20 | 20 20 20 20 20 20 20 20 | a1,d2 | |
|00000e70| 20 20 20 3b 20 4d 61 6b | 65 20 74 68 65 20 6d 65 | ; Mak|e the me|
|00000e80| 73 73 61 67 65 20 74 68 | 65 20 74 68 69 72 64 20 |ssage th|e third |
|00000e90| 70 61 72 61 6d 65 74 65 | 72 00 3b 20 20 20 20 6d |paramete|r.; m|
|00000ea0| 6f 76 65 2e 6c 20 20 61 | 32 2c 64 31 20 20 20 20 |ove.l a|2,d1 |
|00000eb0| 20 20 20 20 20 20 20 20 | 20 3b 20 54 68 65 20 6f | | ; The o|
|00000ec0| 62 6a 65 63 74 20 69 73 | 20 74 68 65 20 73 65 63 |bject is| the sec|
|00000ed0| 6f 6e 64 20 70 61 72 61 | 6d 65 74 65 72 00 3b 20 |ond para|meter.; |
|00000ee0| 20 20 20 6d 6f 76 65 2e | 6c 20 20 61 30 2c 64 30 | move.|l a0,d0|
|00000ef0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 3b 20 54 | | ; T|
|00000f00| 68 65 20 68 6f 6f 6b 20 | 69 73 20 74 68 65 20 66 |he hook |is the f|
|00000f10| 69 72 73 74 20 70 61 72 | 61 6d 65 74 65 72 00 3b |irst par|ameter.;|
|00000f20| 20 20 20 20 6d 6f 76 65 | 2e 6c 20 20 67 6c 6f 62 | move|.l glob|
|00000f30| 61 6c 62 61 73 65 28 70 | 63 29 2c 61 35 20 3b 20 |albase(p|c),a5 ; |
|00000f40| 72 65 73 74 6f 72 65 20 | 6f 75 72 20 67 6c 6f 62 |restore |our glob|
|00000f50| 61 6c 20 76 61 72 69 61 | 62 6c 65 20 62 61 73 65 |al varia|ble base|
|00000f60| 00 3b 20 20 20 20 6d 6f | 76 65 2e 6c 20 20 31 32 |.; mo|ve.l 12|
|00000f70| 28 61 30 29 2c 61 30 20 | 20 20 20 20 20 20 20 20 |(a0),a0 | |
|00000f80| 3b 20 67 65 74 20 70 6f | 69 6e 74 65 72 20 74 6f |; get po|inter to|
|00000f90| 20 68 69 67 68 20 6c 65 | 76 65 6c 20 6c 61 6e 67 | high le|vel lang|
|00000fa0| 75 61 67 65 20 66 75 6e | 63 74 69 6f 6e 00 3b 20 |uage fun|ction.; |
|00000fb0| 20 20 20 6a 73 72 20 20 | 20 20 20 36 28 61 30 29 | jsr | 6(a0)|
|00000fc0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 3b 20 63 | | ; c|
|00000fd0| 61 6c 6c 20 74 68 65 20 | 68 69 67 68 20 6c 65 76 |all the |high lev|
|00000fe0| 65 6c 20 6c 61 6e 67 75 | 61 67 65 20 66 75 6e 63 |el langu|age func|
|00000ff0| 74 69 6f 6e 00 3b 20 20 | 20 20 6d 6f 76 65 6d 2e |tion.; | movem.|
|00001000| 6c 20 28 61 37 29 2b 2c | 64 32 2f 61 35 20 20 20 |l (a7)+,|d2/a5 |
|00001010| 20 20 20 20 3b 20 52 65 | 73 74 6f 72 65 20 6e 6f | ; Re|store no|
|00001020| 6e 2d 73 63 72 61 74 63 | 68 20 72 65 67 69 73 74 |n-scratc|h regist|
|00001030| 65 72 73 20 77 65 20 61 | 6c 74 65 72 65 64 00 3b |ers we a|ltered.;|
|00001040| 20 20 20 20 72 74 73 00 | 3b 67 6c 6f 62 61 6c 62 | rts.|;globalb|
|00001050| 61 73 65 3a 20 44 73 2e | 6c 20 31 20 20 20 20 20 |ase: Ds.|l 1 |
|00001060| 20 20 20 20 20 20 20 3b | 20 53 6f 6d 65 20 73 70 | ;| Some sp|
|00001070| 61 63 65 20 66 6f 72 20 | 70 72 65 73 65 72 76 69 |ace for |preservi|
|00001080| 6e 67 20 67 6c 6f 62 61 | 6c 20 76 61 72 69 61 62 |ng globa|l variab|
|00001090| 6c 65 20 62 61 73 65 00 | 3b 00 3b 28 53 63 72 61 |le base.|;.;(Scra|
|000010a0| 74 63 68 20 72 65 67 69 | 73 74 65 72 73 20 6f 6e |tch regi|sters on|
|000010b0| 20 74 68 65 20 41 6d 69 | 67 61 20 61 72 65 20 72 | the Ami|ga are r|
|000010c0| 65 67 69 73 74 65 72 73 | 20 74 68 61 74 20 68 61 |egisters| that ha|
|000010d0| 76 65 20 62 65 65 6e 20 | 64 65 73 69 67 6e 61 74 |ve been |designat|
|000010e0| 65 64 20 61 73 00 3b 72 | 65 67 69 73 74 65 72 73 |ed as.;r|egisters|
|000010f0| 20 74 68 61 74 20 63 61 | 6e 20 68 61 76 65 20 74 | that ca|n have t|
|00001100| 68 65 69 72 20 63 6f 6e | 74 65 6e 74 73 20 63 68 |heir con|tents ch|
|00001110| 61 6e 67 65 64 20 77 68 | 65 6e 20 63 61 6c 6c 69 |anged wh|en calli|
|00001120| 6e 67 20 66 75 6e 63 74 | 69 6f 6e 73 2c 20 61 6e |ng funct|ions, an|
|00001130| 64 20 61 72 65 00 3b 6e | 6f 74 20 67 75 61 72 75 |d are.;n|ot guaru|
|00001140| 6e 74 65 65 64 20 74 6f | 20 62 65 20 72 65 73 74 |nteed to| be rest|
|00001150| 6f 72 65 64 20 61 66 74 | 65 72 20 74 68 65 20 66 |ored aft|er the f|
|00001160| 75 6e 63 74 69 6f 6e 2e | 20 54 68 65 73 65 20 72 |unction.| These r|
|00001170| 65 67 69 73 74 65 72 73 | 20 61 72 65 20 64 30 2c |egisters| are d0,|
|00001180| 20 64 31 2c 20 61 30 00 | 3b 61 6e 64 20 61 31 2e | d1, a0.|;and a1.|
|00001190| 20 54 68 69 73 20 6d 65 | 61 6e 73 20 77 65 20 63 | This me|ans we c|
|000011a0| 61 6e 20 63 68 61 6e 67 | 65 20 74 68 65 6d 20 61 |an chang|e them a|
|000011b0| 6e 64 20 6e 6f 74 20 6e | 65 65 64 20 74 6f 20 70 |nd not n|eed to p|
|000011c0| 72 65 73 65 72 76 65 20 | 74 68 65 6d 20 73 69 6e |reserve |them sin|
|000011d0| 63 65 20 74 68 65 00 3b | 70 69 65 63 65 20 6f 66 |ce the.;|piece of|
|000011e0| 20 63 6f 64 65 20 74 68 | 61 74 20 63 61 6c 6c 65 | code th|at calle|
|000011f0| 64 20 6f 75 72 20 72 6f | 75 74 69 6e 65 20 73 68 |d our ro|utine sh|
|00001200| 6f 75 6c 64 20 6e 6f 74 | 20 61 73 73 75 6d 65 20 |ould not| assume |
|00001210| 74 68 61 74 20 74 68 65 | 20 63 6f 6e 74 65 6e 74 |that the| content|
|00001220| 73 20 6f 66 00 3b 74 68 | 65 73 65 20 72 65 67 69 |s of.;th|ese regi|
|00001230| 73 74 65 72 20 77 69 6c | 6c 20 62 65 20 74 68 65 |ster wil|l be the|
|00001240| 20 73 61 6d 65 20 77 68 | 65 6e 20 77 65 20 61 72 | same wh|en we ar|
|00001250| 65 20 66 69 6e 69 73 68 | 65 64 2e 29 00 3b 00 3b |e finish|ed.).;.;|
|00001260| 59 6f 75 20 77 69 6c 6c | 20 62 65 20 61 62 6c 65 |You will| be able|
|00001270| 20 74 6f 20 75 73 65 20 | 74 68 61 74 20 70 69 65 | to use |that pie|
|00001280| 63 65 20 6f 66 20 61 73 | 73 65 6d 62 6c 79 20 6c |ce of as|sembly l|
|00001290| 61 6e 67 75 61 67 65 20 | 66 6f 72 20 61 6c 6c 20 |anguage |for all |
|000012a0| 74 68 65 20 68 5f 45 6e | 74 72 79 00 3b 66 69 65 |the h_En|try.;fie|
|000012b0| 6c 64 20 6f 66 20 61 6c | 6c 20 79 6f 75 72 20 68 |ld of al|l your h|
|000012c0| 6f 6f 6b 73 2e 00 3b 00 | 3b 54 6f 20 73 65 74 20 |ooks..;.|;To set |
|000012d0| 75 70 20 61 20 48 6f 6f | 6b 20 6e 65 77 74 79 70 |up a Hoo|k newtyp|
|000012e0| 65 2c 20 79 6f 75 20 63 | 61 6e 20 77 72 69 74 65 |e, you c|an write|
|000012f0| 20 73 6f 6d 65 20 63 6f | 64 65 20 6c 69 6b 65 20 | some co|de like |
|00001300| 74 68 69 73 3a 00 3b 00 | 3b 44 45 46 54 59 50 45 |this:.;.|;DEFTYPE|
|00001310| 2e 48 6f 6f 6b 20 6d 79 | 68 6f 6f 6b 20 20 20 20 |.Hook my|hook |
|00001320| 20 20 20 20 20 20 20 20 | 3b 20 44 65 66 69 6e 65 | |; Define|
|00001330| 20 74 68 65 20 48 6f 6f | 6b 20 76 61 72 69 61 62 | the Hoo|k variab|
|00001340| 6c 65 00 3b 6d 79 68 6f | 6f 6b 5c 68 5f 45 6e 74 |le.;myho|ok\h_Ent|
|00001350| 72 79 20 3d 20 3f 5f 68 | 6f 6f 6b 45 6e 74 72 79 |ry = ?_h|ookEntry|
|00001360| 20 20 20 3b 20 4d 61 6b | 65 20 68 5f 45 6e 74 72 | ; Mak|e h_Entr|
|00001370| 79 20 70 6f 69 6e 74 20 | 74 6f 20 74 68 65 20 41 |y point |to the A|
|00001380| 53 4d 20 72 6f 75 74 69 | 6e 65 20 61 62 6f 76 65 |SM routi|ne above|
|00001390| 00 3b 6d 79 68 6f 6f 6b | 5c 68 5f 53 75 62 45 6e |.;myhook|\h_SubEn|
|000013a0| 74 72 79 20 3d 20 3f 68 | 6f 6f 6b 66 75 6e 63 20 |try = ?h|ookfunc |
|000013b0| 20 3b 20 4d 61 6b 65 20 | 68 5f 53 75 62 45 6e 74 | ; Make |h_SubEnt|
|000013c0| 72 79 20 70 6f 69 6e 74 | 20 74 6f 20 74 68 65 20 |ry point| to the |
|000013d0| 42 6c 69 74 7a 20 66 75 | 6e 63 74 69 6f 6e 00 3b |Blitz fu|nction.;|
|000013e0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000013f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 3b | | ;|
|00001400| 20 77 65 20 77 61 6e 74 | 20 74 6f 20 75 73 65 20 | we want| to use |
|00001410| 61 73 20 74 68 65 20 68 | 6f 6f 6b 20 66 75 6e 63 |as the h|ook func|
|00001420| 74 69 6f 6e 00 3b 6d 79 | 68 6f 6f 6b 5c 68 5f 44 |tion.;my|hook\h_D|
|00001430| 61 74 61 20 3d 20 24 44 | 45 41 44 42 45 45 46 20 |ata = $D|EADBEEF |
|00001440| 20 20 20 20 20 3b 20 54 | 68 69 73 20 63 61 6e 20 | ; T|his can |
|00001450| 62 65 20 61 6e 79 74 68 | 69 6e 67 20 79 6f 75 20 |be anyth|ing you |
|00001460| 77 61 6e 74 00 3b 00 3b | 00 3b 41 74 20 74 68 65 |want.;.;|.;At the|
|00001470| 20 74 6f 70 20 6f 66 20 | 79 6f 75 72 20 70 72 6f | top of |your pro|
|00001480| 67 72 61 6d 20 73 6f 6d | 65 77 68 65 72 65 20 79 |gram som|ewhere y|
|00001490| 6f 75 20 77 6f 75 6c 64 | 20 6e 65 65 64 20 74 6f |ou would| need to|
|000014a0| 20 70 75 74 20 74 68 69 | 73 20 6c 69 6e 65 20 28 | put thi|s line (|
|000014b0| 73 6f 20 74 68 61 74 00 | 3b 74 68 65 20 67 6c 6f |so that.|;the glo|
|000014c0| 62 61 6c 20 76 61 72 69 | 61 62 6c 65 20 62 61 73 |bal vari|able bas|
|000014d0| 65 20 72 65 67 69 73 74 | 65 72 20 69 73 20 70 72 |e regist|er is pr|
|000014e0| 65 73 65 72 76 65 64 29 | 3a 00 3b 00 3b 6d 6f 76 |eserved)|:.;.;mov|
|000014f0| 65 2e 6c 20 61 35 2c 67 | 6c 6f 62 61 6c 62 61 73 |e.l a5,g|lobalbas|
|00001500| 65 00 3b 00 3b 00 3b 46 | 69 6e 61 6c 6c 79 2c 20 |e.;.;.;F|inally, |
|00001510| 79 6f 75 20 68 61 76 65 | 20 79 6f 75 72 20 42 6c |you have| your Bl|
|00001520| 69 74 7a 20 66 75 6e 63 | 74 69 6f 6e 20 77 68 69 |itz func|tion whi|
|00001530| 63 68 20 79 6f 75 20 61 | 72 65 20 75 73 69 6e 67 |ch you a|re using|
|00001540| 20 61 73 20 74 68 65 20 | 68 6f 6f 6b 20 66 75 6e | as the |hook fun|
|00001550| 63 74 69 6f 6e 3a 00 3b | 00 3b 52 75 6e 45 72 72 |ction:.;|.;RunErr|
|00001560| 73 4f 66 66 00 3b 68 6f | 6f 6b 66 75 6e 63 3a 20 |sOff.;ho|okfunc: |
|00001570| 20 20 20 20 20 20 20 3b | 20 54 68 69 73 20 69 73 | ;| This is|
|00001580| 20 74 68 65 20 6c 61 62 | 65 6c 20 74 68 61 74 20 | the lab|el that |
|00001590| 79 6f 75 20 75 73 65 20 | 69 6e 20 74 68 65 20 68 |you use |in the h|
|000015a0| 5f 53 75 62 45 6e 74 72 | 79 20 66 69 65 6c 64 00 |_SubEntr|y field.|
|000015b0| 3b 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |; | |
|000015c0| 20 20 3b 20 61 73 20 73 | 68 6f 77 6e 20 61 62 6f | ; as s|hown abo|
|000015d0| 76 65 00 3b 46 75 6e 63 | 74 69 6f 6e 2e 6c 20 4d |ve.;Func|tion.l M|
|000015e0| 79 48 6f 6f 6b 46 75 6e | 63 7b 2a 68 6f 6f 6b 2e |yHookFun|c{*hook.|
|000015f0| 48 6f 6f 6b 2c 20 2a 6f | 62 6a 65 63 74 2e 6c 2c |Hook, *o|bject.l,|
|00001600| 20 2a 6d 65 73 73 61 67 | 65 2e 6c 7d 00 3b 20 20 | *messag|e.l}.; |
|00001610| 20 20 3b 20 59 6f 75 20 | 63 61 6e 20 6f 66 20 63 | ; You |can of c|
|00001620| 6f 75 72 73 65 20 6d 61 | 6b 65 20 74 68 65 20 6f |ourse ma|ke the o|
|00001630| 62 6a 65 63 74 20 61 6e | 64 20 6d 65 73 73 61 67 |bject an|d messag|
|00001640| 65 20 70 61 72 61 6d 65 | 74 65 72 73 20 68 61 76 |e parame|ters hav|
|00001650| 65 20 61 6e 79 20 74 79 | 70 65 00 3b 20 20 20 20 |e any ty|pe.; |
|00001660| 3b 20 79 6f 75 20 77 61 | 6e 74 2c 20 73 6f 20 74 |; you wa|nt, so t|
|00001670| 68 61 74 20 74 68 65 79 | 20 61 72 65 20 6d 6f 72 |hat they| are mor|
|00001680| 65 20 65 61 73 69 6c 79 | 20 75 73 65 64 2e 00 3b |e easily| used..;|
|00001690| 00 3b 20 20 20 20 3b 20 | 4f 62 76 69 6f 75 73 6c |.; ; |Obviousl|
|000016a0| 79 20 79 6f 75 20 77 6f | 75 6c 64 20 64 6f 20 77 |y you wo|uld do w|
|000016b0| 68 61 74 65 76 65 72 20 | 79 6f 75 20 6e 65 65 64 |hatever |you need|
|000016c0| 20 69 6e 20 68 65 72 65 | 2e 20 41 6e 79 20 76 61 | in here|. Any va|
|000016d0| 6c 75 65 20 74 68 61 74 | 20 79 6f 75 00 3b 20 20 |lue that| you.; |
|000016e0| 20 20 3b 20 72 65 74 75 | 72 6e 20 66 72 6f 6d 20 | ; retu|rn from |
|000016f0| 74 68 69 73 20 66 75 6e | 63 74 69 6f 6e 20 77 69 |this fun|ction wi|
|00001700| 6c 6c 20 62 65 20 74 68 | 65 20 76 61 6c 75 65 20 |ll be th|e value |
|00001710| 72 65 74 75 72 6e 65 64 | 20 74 6f 20 74 68 65 20 |returned| to the |
|00001720| 4f 53 20 66 75 6e 63 74 | 69 6f 6e 00 3b 20 20 20 |OS funct|ion.; |
|00001730| 20 3b 20 62 79 20 74 68 | 65 20 68 6f 6f 6b 2e 00 | ; by th|e hook..|
|00001740| 3b 45 6e 64 20 46 75 6e | 63 74 69 6f 6e 00 3b 52 |;End Fun|ction.;R|
|00001750| 75 6e 45 72 72 73 4f 6e | 00 3b 00 3b 00 3b 54 68 |unErrsOn|.;.;.;Th|
|00001760| 65 6e 2c 20 77 68 65 6e | 20 79 6f 75 20 63 61 6c |en, when| you cal|
|00001770| 6c 20 74 68 65 20 4f 53 | 20 66 75 6e 63 74 69 6f |l the OS| functio|
|00001780| 6e 20 79 6f 75 20 61 72 | 65 20 65 78 74 65 6e 64 |n you ar|e extend|
|00001790| 69 6e 67 2c 20 69 74 20 | 77 69 6c 6c 20 6e 6f 72 |ing, it |will nor|
|000017a0| 6d 61 6c 6c 79 20 68 61 | 76 65 20 61 00 3b 74 61 |mally ha|ve a.;ta|
|000017b0| 67 20 74 68 61 74 20 79 | 6f 75 20 63 61 6e 20 73 |g that y|ou can s|
|000017c0| 70 65 63 69 66 79 20 61 | 20 68 6f 6f 6b 20 66 6f |pecify a| hook fo|
|000017d0| 72 2e 20 59 6f 75 20 77 | 6f 75 6c 64 20 64 6f 20 |r. You w|ould do |
|000017e0| 74 68 61 74 20 62 79 20 | 70 61 73 73 69 6e 67 20 |that by |passing |
|000017f0| 74 68 65 20 61 64 64 72 | 65 73 73 20 6f 66 00 3b |the addr|ess of.;|
|00001800| 74 68 65 20 6d 79 68 6f | 6f 6b 20 76 61 72 69 61 |the myho|ok varia|
|00001810| 62 6c 65 20 69 6e 20 74 | 68 69 73 20 65 78 61 6d |ble in t|his exam|
|00001820| 70 6c 65 20 28 75 73 69 | 6e 67 20 26 6d 79 68 6f |ple (usi|ng &myho|
|00001830| 6f 6b 29 2e 00 3b 00 3b | 00 3b 49 66 20 79 6f 75 |ok)..;.;|.;If you|
|00001840| 20 77 61 6e 74 20 6d 6f | 72 65 20 74 68 61 6e 20 | want mo|re than |
|00001850| 6f 6e 65 20 68 6f 6f 6b | 20 69 6e 20 61 20 70 72 |one hook| in a pr|
|00001860| 6f 67 72 61 6d 2c 20 74 | 68 65 20 65 61 73 69 65 |ogram, t|he easie|
|00001870| 73 74 20 74 68 69 6e 6b | 20 74 6f 20 64 6f 20 69 |st think| to do i|
|00001880| 73 20 73 65 74 20 75 70 | 20 61 00 3b 66 65 77 20 |s set up| a.;few |
|00001890| 48 6f 6f 6b 20 6e 65 77 | 74 79 70 65 20 76 61 72 |Hook new|type var|
|000018a0| 69 61 62 6c 65 73 20 61 | 6e 64 20 67 69 76 65 20 |iables a|nd give |
|000018b0| 74 68 65 6d 20 61 6c 6c | 20 74 68 65 20 73 61 6d |them all| the sam|
|000018c0| 65 20 68 5f 45 6e 74 72 | 79 20 28 74 68 65 20 6f |e h_Entr|y (the o|
|000018d0| 6e 65 20 61 62 6f 76 65 | 00 3b 73 68 6f 75 6c 64 |ne above|.;should|
|000018e0| 20 62 65 20 4f 4b 20 66 | 6f 72 20 61 6c 6c 29 20 | be OK f|or all) |
|000018f0| 61 6e 64 20 74 68 65 6e | 20 61 20 64 69 66 66 65 |and then| a diffe|
|00001900| 72 65 6e 74 20 68 5f 53 | 75 62 45 6e 74 72 79 2c |rent h_S|ubEntry,|
|00001910| 20 63 61 6c 6c 69 6e 67 | 20 74 68 65 20 61 70 70 | calling| the app|
|00001920| 72 6f 70 72 69 61 74 65 | 00 3b 66 75 6e 63 74 69 |ropriate|.;functi|
|00001930| 6f 6e 2e 00 00 00 80 7e | 2e 6c 20 20 61 35 2c 67 |on.....~|.l a5,g|
|00001940| 6c 6f 62 61 6c 62 61 73 | 65 20 20 20 3b 20 53 74 |lobalbas|e ; St|
|00001950| 6f 72 65 20 61 20 63 6f | 70 79 20 6f 66 20 42 6c |ore a co|py of Bl|
|00001960| 69 74 7a 27 73 20 67 6c | 6f 62 61 6c 20 76 61 72 |itz's gl|obal var|
|00001970| 69 61 62 6c 65 20 62 61 | 73 65 20 70 6f 69 6e 74 |iable ba|se point|
|00001980| 65 72 00 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |er. | |
|00001990| 20 20 20 20 20 20 20 20 | 20 20 20 3b 20 54 68 69 | | ; Thi|
|000019a0| 73 20 73 68 6f 75 6c 64 | 20 61 6c 77 61 79 73 20 |s should| always |
|000019b0| 62 65 20 64 6f 6e 65 20 | 73 6f 6d 65 77 68 65 72 |be done |somewher|
|000019c0| 65 20 62 65 66 6f 72 65 | 20 75 73 69 6e 67 20 74 |e before| using t|
|000019d0| 68 65 00 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |he. | |
|000019e0| 20 20 20 20 20 20 20 20 | 20 20 20 3b 20 68 6f 6f | | ; hoo|
|000019f0| 6b 73 2c 20 61 6e 64 20 | 6f 6e 6c 79 20 6e 65 65 |ks, and |only nee|
|00001a00| 64 73 20 74 6f 20 62 65 | 20 64 6f 6e 65 20 6f 6e |ds to be| done on|
|00001a10| 63 65 00 00 3b 20 54 68 | 65 73 65 20 64 65 66 69 |ce..; Th|ese defi|
|00001a20| 6e 65 73 20 73 68 6f 75 | 6c 64 20 62 65 20 69 6e |nes shou|ld be in|
|00001a30| 20 61 6d 69 67 61 6c 69 | 62 73 2e 72 65 73 2c 20 | amigali|bs.res, |
|00001a40| 62 75 74 20 74 68 65 79 | 20 61 70 70 65 61 72 20 |but they| appear |
|00001a50| 6e 6f 74 20 74 6f 20 62 | 65 20 69 6e 20 73 6f 6d |not to b|e in som|
|00001a60| 65 20 76 65 72 73 69 6f | 6e 73 00 23 44 54 41 47 |e versio|ns.#DTAG|
|00001a70| 5f 44 49 53 50 3d 24 38 | 30 30 30 30 30 30 30 00 |_DISP=$8|0000000.|
|00001a80| 23 44 54 41 47 5f 44 49 | 4d 53 3d 24 38 30 30 30 |#DTAG_DI|MS=$8000|
|00001a90| 31 30 30 30 00 23 44 54 | 41 47 5f 4d 4e 54 52 3d |1000.#DT|AG_MNTR=|
|00001aa0| 24 38 30 30 30 32 30 30 | 30 00 23 44 54 41 47 5f |$8000200|0.#DTAG_|
|00001ab0| 4e 41 4d 45 3d 24 38 30 | 30 30 33 30 30 30 00 00 |NAME=$80|003000..|
|00001ac0| 3b 20 54 68 65 20 69 6e | 69 74 69 61 6c 20 76 61 |; The in|itial va|
|00001ad0| 6c 75 65 73 20 66 6f 72 | 20 74 68 65 20 77 69 64 |lues for| the wid|
|00001ae0| 74 68 20 61 6e 64 20 68 | 65 69 67 68 74 20 77 68 |th and h|eight wh|
|00001af0| 65 6e 20 6f 70 65 6e 69 | 6e 67 20 74 68 65 20 73 |en openi|ng the s|
|00001b00| 63 72 65 65 6e 6d 6f 64 | 65 00 3b 20 72 65 71 75 |creenmod|e.; requ|
|00001b10| 65 73 74 65 72 20 28 73 | 69 6c 6c 79 20 72 65 61 |ester (s|illy rea|
|00001b20| 6c 6c 79 2c 20 61 73 20 | 77 65 20 77 6f 6e 27 74 |lly, as |we won't|
|00001b30| 20 73 65 65 20 74 68 65 | 6d 20 2d 20 73 65 65 20 | see the|m - see |
|00001b40| 6c 61 74 65 72 20 69 6e | 20 63 6f 64 65 29 00 50 |later in| code).P|
|00001b50| 72 65 66 44 69 73 70 6c | 61 79 57 69 64 74 68 2e |refDispl|ayWidth.|
|00001b60| 77 3d 33 32 30 00 50 72 | 65 66 44 69 73 70 6c 61 |w=320.Pr|efDispla|
|00001b70| 79 48 65 69 67 68 74 2e | 77 3d 32 34 30 00 00 00 |yHeight.|w=240...|
|00001b80| 3b 20 44 65 66 69 6e 65 | 20 61 20 68 6f 6f 6b 2c |; Define| a hook,|
|00001b90| 20 61 6e 64 20 73 65 74 | 20 69 74 00 80 33 2e 48 | and set| it..3.H|
|00001ba0| 6f 6f 6b 20 6d 79 68 6f | 6f 6b 20 20 20 20 20 20 |ook myho|ok |
|00001bb0| 20 20 20 20 20 20 20 3b | 20 54 68 65 20 68 6f 6f | ;| The hoo|
|00001bc0| 6b 20 66 6f 72 20 41 53 | 4c 20 74 61 67 20 61 73 |k for AS|L tag as|
|00001bd0| 20 26 6d 79 68 6f 6f 6b | 00 6d 79 68 6f 6f 6b 5c | &myhook|.myhook\|
|00001be0| 68 5f 45 6e 74 72 79 3d | 3f 5f 68 6f 6f 6b 45 6e |h_Entry=|?_hookEn|
|00001bf0| 74 72 79 20 20 20 20 20 | 20 3b 20 53 65 74 20 61 |try | ; Set a|
|00001c00| 64 64 72 65 73 73 20 6f | 66 20 68 6f 6f 6b 20 73 |ddress o|f hook s|
|00001c10| 74 75 62 20 77 68 69 63 | 68 20 73 6f 72 74 73 20 |tub whic|h sorts |
|00001c20| 6f 75 74 20 72 65 67 69 | 73 74 65 72 73 20 61 6e |out regi|sters an|
|00001c30| 64 20 63 61 6c 6c 73 20 | 42 6c 69 74 7a 20 66 75 |d calls |Blitz fu|
|00001c40| 6e 63 74 69 6f 6e 00 20 | 20 20 20 20 20 20 20 20 |nction. | |
|00001c50| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001c60| 20 20 20 20 20 20 20 3b | 20 74 68 65 20 68 6f 6f | ;| the hoo|
|00001c70| 6b 20 73 74 75 62 20 69 | 6e 20 74 68 69 73 20 63 |k stub i|n this c|
|00001c80| 6f 64 65 20 63 61 6e 20 | 62 65 20 75 73 65 64 20 |ode can |be used |
|00001c90| 61 73 20 61 6e 20 61 6c | 6c 20 70 75 72 70 6f 73 |as an al|l purpos|
|00001ca0| 65 20 68 6f 6f 6b 00 20 | 20 20 20 20 20 20 20 20 |e hook. | |
|00001cb0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001cc0| 20 20 20 20 20 20 20 3b | 20 61 73 20 6c 6f 6e 67 | ;| as long|
|00001cd0| 20 61 73 20 79 6f 75 20 | 73 65 74 20 74 68 65 20 | as you |set the |
|00001ce0| 61 64 64 72 65 73 73 20 | 6f 66 20 74 68 65 20 66 |address |of the f|
|00001cf0| 75 6e 63 74 69 6f 6e 20 | 69 6e 20 74 68 65 20 68 |unction |in the h|
|00001d00| 6f 6f 6b 20 68 5f 53 75 | 62 45 6e 74 72 79 00 20 |ook h_Su|bEntry. |
|00001d10| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001d20| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 3b | | ;|
|00001d30| 20 66 69 65 6c 64 20 61 | 6e 64 20 79 6f 75 20 73 | field a|nd you s|
|00001d40| 65 74 20 75 70 20 74 68 | 69 73 20 66 75 6e 63 74 |et up th|is funct|
|00001d50| 69 6f 6e 20 73 6f 20 74 | 68 61 74 20 69 74 20 72 |ion so t|hat it r|
|00001d60| 65 74 75 72 6e 73 20 61 | 20 6c 6f 6e 67 2c 20 61 |eturns a| long, a|
|00001d70| 6e 64 20 74 61 6b 65 73 | 00 20 20 20 20 20 20 20 |nd takes|. |
|00001d80| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001d90| 20 20 20 20 20 20 20 20 | 20 3b 20 74 68 72 65 65 | | ; three|
|00001da0| 20 6c 6f 6e 67 20 70 61 | 72 61 6d 65 74 65 72 73 | long pa|rameters|
|00001db0| 20 28 73 74 61 6e 64 61 | 72 64 20 66 6f 72 20 61 | (standa|rd for a|
|00001dc0| 20 68 6f 6f 6b 20 66 75 | 6e 63 74 69 6f 6e 29 2e | hook fu|nction).|
|00001dd0| 20 54 68 65 20 74 68 72 | 65 65 00 20 20 20 20 20 | The thr|ee. |
|00001de0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001df0| 20 20 20 20 20 20 20 20 | 20 20 20 3b 20 70 61 72 | | ; par|
|00001e00| 61 6d 65 74 65 72 73 20 | 77 69 6c 6c 20 62 65 20 |ameters |will be |
|00001e10| 61 73 20 73 70 65 63 69 | 66 69 65 64 20 69 6e 20 |as speci|fied in |
|00001e20| 74 68 65 20 41 75 74 6f | 64 6f 63 73 20 66 6f 72 |the Auto|docs for|
|00001e30| 20 74 68 65 20 68 6f 6f | 6b 00 20 20 20 20 20 20 | the hoo|k. |
|00001e40| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001e50| 20 20 20 20 20 20 20 20 | 20 20 3b 20 63 61 6c 6c | | ; call|
|00001e60| 62 61 63 6b 20 79 6f 75 | 20 61 72 65 20 74 72 79 |back you| are try|
|00001e70| 69 6e 67 20 74 6f 20 75 | 73 65 20 65 78 63 65 70 |ing to u|se excep|
|00001e80| 74 20 74 68 65 20 70 61 | 72 61 6d 65 74 65 72 73 |t the pa|rameters|
|00001e90| 20 77 69 6c 6c 20 61 72 | 72 69 76 65 00 20 20 20 | will ar|rive. |
|00001ea0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001eb0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 3b 20 61 | | ; a|
|00001ec0| 73 20 70 61 72 61 6d 65 | 74 65 72 20 31 20 69 6e |s parame|ter 1 in|
|00001ed0| 73 74 65 61 64 20 6f 66 | 20 61 30 2c 20 70 61 72 |stead of| a0, par|
|00001ee0| 61 6d 65 74 65 72 20 32 | 20 69 6e 73 74 65 61 64 |ameter 2| instead|
|00001ef0| 20 6f 66 20 61 32 20 61 | 6e 64 20 70 61 72 61 6d | of a2 a|nd param|
|00001f00| 65 74 65 72 20 33 00 20 | 20 20 20 20 20 20 20 20 |eter 3. | |
|00001f10| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001f20| 20 20 20 20 20 20 20 3b | 20 69 6e 73 74 65 61 64 | ;| instead|
|00001f30| 20 6f 66 20 61 31 2e 00 | 6d 79 68 6f 6f 6b 5c 68 | of a1..|myhook\h|
|00001f40| 5f 53 75 62 45 6e 74 72 | 79 20 3d 20 3f 68 6f 6f |_SubEntr|y = ?hoo|
|00001f50| 6b 66 75 6e 63 20 20 20 | 3b 20 53 65 74 20 61 64 |kfunc |; Set ad|
|00001f60| 64 72 65 73 73 20 6f 66 | 20 42 6c 69 74 7a 20 66 |dress of| Blitz f|
|00001f70| 75 6e 63 74 69 6f 6e 20 | 74 68 61 74 20 79 6f 75 |unction |that you|
|00001f80| 20 77 61 6e 74 20 74 6f | 20 75 73 65 20 61 73 20 | want to| use as |
|00001f90| 68 6f 6f 6b 20 63 61 6c | 6c 62 61 63 6b 00 20 20 |hook cal|lback. |
|00001fa0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001fb0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 3b 20 | | ; |
|00001fc0| 66 75 6e 63 74 69 6f 6e | 00 20 20 20 20 20 20 20 |function|. |
|00001fd0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001fe0| 20 20 20 20 20 20 20 20 | 20 3b 20 4e 42 20 54 68 | | ; NB Th|
|00001ff0| 61 74 20 79 6f 75 20 6d | 75 73 74 20 68 61 76 65 |at you m|ust have|
|00002000| 20 61 20 6c 61 62 65 6c | 20 64 69 72 65 63 74 6c | a label| directl|
|00002010| 79 20 62 65 66 6f 72 65 | 20 74 68 65 20 66 75 6e |y before| the fun|
|00002020| 63 74 69 6f 6e 00 00 00 | 3b 20 53 65 74 20 75 70 |ction...|; Set up|
|00002030| 20 73 6f 6d 65 20 74 61 | 67 73 20 66 6f 72 20 74 | some ta|gs for t|
|00002040| 68 65 20 41 53 4c 20 73 | 63 72 65 65 6e 6d 6f 64 |he ASL s|creenmod|
|00002050| 65 20 72 65 71 75 65 73 | 74 65 72 00 80 04 20 53 |e reques|ter... S|
|00002060| 4d 52 74 61 67 73 2e 54 | 61 67 49 74 65 6d 28 31 |MRtags.T|agItem(1|
|00002070| 38 29 00 53 4d 52 74 61 | 67 73 28 30 29 5c 74 69 |8).SMRta|gs(0)\ti|
|00002080| 5f 54 61 67 3d 23 41 53 | 4c 53 4d 5f 49 6e 69 74 |_Tag=#AS|LSM_Init|
|00002090| 69 61 6c 4c 65 66 74 45 | 64 67 65 2c 31 36 30 20 |ialLeftE|dge,160 |
|000020a0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000020b0| 20 20 20 3b 20 49 6e 69 | 74 69 61 6c 20 6c 65 66 | ; Ini|tial lef|
|000020c0| 74 20 65 64 67 65 20 6f | 66 20 72 65 71 75 65 73 |t edge o|f reques|
|000020d0| 74 65 72 00 53 4d 52 74 | 61 67 73 28 31 29 5c 74 |ter.SMRt|ags(1)\t|
|000020e0| 69 5f 54 61 67 3d 23 41 | 53 4c 53 4d 5f 49 6e 69 |i_Tag=#A|SLSM_Ini|
|000020f0| 74 69 61 6c 54 6f 70 45 | 64 67 65 2c 30 20 20 20 |tialTopE|dge,0 |
|00002100| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002110| 20 20 20 20 3b 20 49 6e | 69 74 69 61 6c 20 74 6f | ; In|itial to|
|00002120| 70 20 65 64 67 65 20 6f | 66 20 72 65 71 75 65 73 |p edge o|f reques|
|00002130| 74 65 72 00 53 4d 52 74 | 61 67 73 28 32 29 5c 74 |ter.SMRt|ags(2)\t|
|00002140| 69 5f 54 61 67 3d 23 41 | 53 4c 53 4d 5f 49 6e 69 |i_Tag=#A|SLSM_Ini|
|00002150| 74 69 61 6c 57 69 64 74 | 68 2c 33 30 30 20 20 20 |tialWidt|h,300 |
|00002160| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002170| 20 20 20 20 3b 20 49 6e | 69 74 69 61 6c 20 77 69 | ; In|itial wi|
|00002180| 64 74 68 20 6f 66 20 72 | 65 71 75 65 73 74 65 72 |dth of r|equester|
|00002190| 00 53 4d 52 74 61 67 73 | 28 33 29 5c 74 69 5f 54 |.SMRtags|(3)\ti_T|
|000021a0| 61 67 3d 23 41 53 4c 53 | 4d 5f 49 6e 69 74 69 61 |ag=#ASLS|M_Initia|
|000021b0| 6c 48 65 69 67 68 74 2c | 36 30 30 20 20 20 20 20 |lHeight,|600 |
|000021c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000021d0| 20 3b 20 49 6e 69 74 69 | 61 6c 20 68 65 69 67 68 | ; Initi|al heigh|
|000021e0| 74 20 6f 66 20 72 65 71 | 75 65 73 74 65 72 00 53 |t of req|uester.S|
|000021f0| 4d 52 74 61 67 73 28 34 | 29 5c 74 69 5f 54 61 67 |MRtags(4|)\ti_Tag|
|00002200| 3d 23 41 53 4c 53 4d 5f | 49 6e 69 74 69 61 6c 44 |=#ASLSM_|InitialD|
|00002210| 69 73 70 6c 61 79 49 44 | 2c 24 32 31 30 30 30 20 |isplayID|,$21000 |
|00002220| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 3b | | ;|
|00002230| 20 49 6e 69 74 69 61 6c | 20 73 63 72 65 65 6e 6d | Initial| screenm|
|00002240| 6f 64 65 20 28 69 66 20 | 70 72 65 73 65 6e 74 2c |ode (if |present,|
|00002250| 20 50 41 4c 3a 4c 6f 77 | 72 65 73 29 00 53 4d 52 | PAL:Low|res).SMR|
|00002260| 74 61 67 73 28 35 29 5c | 74 69 5f 54 61 67 3d 23 |tags(5)\|ti_Tag=#|
|00002270| 41 53 4c 53 4d 5f 49 6e | 69 74 69 61 6c 44 69 73 |ASLSM_In|itialDis|
|00002280| 70 6c 61 79 44 65 70 74 | 68 2c 38 20 20 20 20 20 |playDept|h,8 |
|00002290| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 3b 20 49 | | ; I|
|000022a0| 6e 69 74 69 61 6c 20 64 | 65 70 74 68 20 6f 66 20 |nitial d|epth of |
|000022b0| 73 63 72 65 65 6e 20 28 | 69 6e 20 62 69 74 70 6c |screen (|in bitpl|
|000022c0| 61 6e 65 73 2f 62 69 74 | 73 20 70 65 72 20 70 69 |anes/bit|s per pi|
|000022d0| 78 65 6c 29 00 53 4d 52 | 74 61 67 73 28 36 29 5c |xel).SMR|tags(6)\|
|000022e0| 74 69 5f 54 61 67 3d 23 | 41 53 4c 53 4d 5f 49 6e |ti_Tag=#|ASLSM_In|
|000022f0| 69 74 69 61 6c 44 69 73 | 70 6c 61 79 57 69 64 74 |itialDis|playWidt|
|00002300| 68 2c 50 72 65 66 44 69 | 73 70 6c 61 79 57 69 64 |h,PrefDi|splayWid|
|00002310| 74 68 20 20 20 3b 20 49 | 6e 69 74 69 61 6c 20 77 |th ; I|nitial w|
|00002320| 69 64 74 68 20 6f 66 20 | 64 65 73 69 72 65 64 20 |idth of |desired |
|00002330| 73 63 72 65 65 6e 00 53 | 4d 52 74 61 67 73 28 37 |screen.S|MRtags(7|
|00002340| 29 5c 74 69 5f 54 61 67 | 3d 23 41 53 4c 53 4d 5f |)\ti_Tag|=#ASLSM_|
|00002350| 49 6e 69 74 69 61 6c 44 | 69 73 70 6c 61 79 48 65 |InitialD|isplayHe|
|00002360| 69 67 68 74 2c 50 72 65 | 66 44 69 73 70 6c 61 79 |ight,Pre|fDisplay|
|00002370| 48 65 69 67 68 74 20 3b | 20 49 6e 69 74 69 61 6c |Height ;| Initial|
|00002380| 20 68 65 69 67 68 74 20 | 6f 66 20 64 65 73 69 72 | height |of desir|
|00002390| 65 64 20 73 63 72 65 65 | 6e 00 53 4d 52 74 61 67 |ed scree|n.SMRtag|
|000023a0| 73 28 38 29 5c 74 69 5f | 54 61 67 3d 23 41 53 4c |s(8)\ti_|Tag=#ASL|
|000023b0| 53 4d 5f 49 6e 69 74 69 | 61 6c 4f 76 65 72 73 63 |SM_Initi|alOversc|
|000023c0| 61 6e 54 79 70 65 2c 32 | 20 20 20 20 20 20 20 20 |anType,2| |
|000023d0| 20 20 20 20 20 20 20 20 | 20 20 3b 20 49 6e 69 74 | | ; Init|
|000023e0| 69 61 6c 20 6f 76 65 72 | 73 63 61 6e 20 74 79 70 |ial over|scan typ|
|000023f0| 65 20 69 6e 20 63 79 63 | 6c 65 20 67 61 64 67 65 |e in cyc|le gadge|
|00002400| 74 20 28 32 20 3d 20 23 | 4f 53 43 41 4e 5f 53 54 |t (2 = #|OSCAN_ST|
|00002410| 41 4e 44 41 52 44 29 00 | 53 4d 52 74 61 67 73 28 |ANDARD).|SMRtags(|
|00002420| 39 29 5c 74 69 5f 54 61 | 67 3d 23 41 53 4c 53 4d |9)\ti_Ta|g=#ASLSM|
|00002430| 5f 49 6e 69 74 69 61 6c | 49 6e 66 6f 4f 70 65 6e |_Initial|InfoOpen|
|00002440| 65 64 2c 31 20 20 20 20 | 20 20 20 20 20 20 20 20 |ed,1 | |
|00002450| 20 20 20 20 20 20 20 20 | 3b 20 53 65 74 20 69 6e | |; Set in|
|00002460| 66 6f 72 6d 61 74 69 6f | 6e 20 62 6f 78 20 74 6f |formatio|n box to|
|00002470| 20 6f 70 65 6e 00 53 4d | 52 74 61 67 73 28 31 30 | open.SM|Rtags(10|
|00002480| 29 5c 74 69 5f 54 61 67 | 3d 23 41 53 4c 53 4d 5f |)\ti_Tag|=#ASLSM_|
|00002490| 49 6e 69 74 69 61 6c 49 | 6e 66 6f 4c 65 66 74 45 |InitialI|nfoLeftE|
|000024a0| 64 67 65 2c 33 35 30 20 | 20 20 20 20 20 20 20 20 |dge,350 | |
|000024b0| 20 20 20 20 20 20 3b 20 | 49 6e 69 74 69 61 6c 20 | ; |Initial |
|000024c0| 6c 65 66 74 20 65 64 67 | 65 20 6f 66 20 69 6e 66 |left edg|e of inf|
|000024d0| 6f 20 62 6f 78 00 53 4d | 52 74 61 67 73 28 31 31 |o box.SM|Rtags(11|
|000024e0| 29 5c 74 69 5f 54 61 67 | 3d 23 41 53 4c 53 4d 5f |)\ti_Tag|=#ASLSM_|
|000024f0| 49 6e 69 74 69 61 6c 49 | 6e 66 6f 54 6f 70 45 64 |InitialI|nfoTopEd|
|00002500| 67 65 2c 35 30 20 20 20 | 20 20 20 20 20 20 20 20 |ge,50 | |
|00002510| 20 20 20 20 20 20 3b 20 | 49 6e 69 74 69 61 6c 20 | ; |Initial |
|00002520| 74 6f 70 20 65 64 67 65 | 20 6f 66 20 69 6e 66 6f |top edge| of info|
|00002530| 20 62 6f 78 00 53 4d 52 | 74 61 67 73 28 31 32 29 | box.SMR|tags(12)|
|00002540| 5c 74 69 5f 54 61 67 3d | 23 41 53 4c 53 4d 5f 44 |\ti_Tag=|#ASLSM_D|
|00002550| 6f 44 65 70 74 68 2c 30 | 20 20 20 20 20 20 20 20 |oDepth,0| |
|00002560| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002570| 20 20 20 20 20 3b 20 44 | 6f 6e 27 74 20 73 68 6f | ; D|on't sho|
|00002580| 77 20 64 65 70 74 68 20 | 72 65 71 75 65 73 74 65 |w depth |requeste|
|00002590| 72 20 74 6f 20 75 73 65 | 72 00 53 4d 52 74 61 67 |r to use|r.SMRtag|
|000025a0| 73 28 31 33 29 5c 74 69 | 5f 54 61 67 3d 23 41 53 |s(13)\ti|_Tag=#AS|
|000025b0| 4c 53 4d 5f 44 6f 4f 76 | 65 72 73 63 61 6e 54 79 |LSM_DoOv|erscanTy|
|000025c0| 70 65 2c 31 20 20 20 20 | 20 20 20 20 20 20 20 20 |pe,1 | |
|000025d0| 20 20 20 20 20 20 20 20 | 20 20 3b 20 53 68 6f 77 | | ; Show|
|000025e0| 20 6f 76 65 72 73 63 61 | 6e 20 63 79 63 6c 65 20 | oversca|n cycle |
|000025f0| 67 61 64 67 65 74 20 74 | 6f 20 75 73 65 72 00 53 |gadget t|o user.S|
|00002600| 4d 52 74 61 67 73 28 31 | 34 29 5c 74 69 5f 54 61 |MRtags(1|4)\ti_Ta|
|00002610| 67 3d 23 41 53 4c 53 4d | 5f 44 6f 57 69 64 74 68 |g=#ASLSM|_DoWidth|
|00002620| 2c 31 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |,1 | |
|00002630| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 3b | | ;|
|00002640| 20 53 68 6f 77 20 77 69 | 64 74 68 20 67 61 64 67 | Show wi|dth gadg|
|00002650| 65 74 20 74 6f 20 75 73 | 65 72 00 53 4d 52 74 61 |et to us|er.SMRta|
|00002660| 67 73 28 31 35 29 5c 74 | 69 5f 54 61 67 3d 23 41 |gs(15)\t|i_Tag=#A|
|00002670| 53 4c 53 4d 5f 44 6f 48 | 65 69 67 68 74 2c 31 20 |SLSM_DoH|eight,1 |
|00002680| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002690| 20 20 20 20 20 20 20 20 | 20 20 20 3b 20 53 68 6f | | ; Sho|
|000026a0| 77 20 68 65 69 67 68 74 | 20 67 61 64 67 65 74 20 |w height| gadget |
|000026b0| 74 6f 20 75 73 65 72 00 | 53 4d 52 74 61 67 73 28 |to user.|SMRtags(|
|000026c0| 31 36 29 5c 74 69 5f 54 | 61 67 3d 23 41 53 4c 53 |16)\ti_T|ag=#ASLS|
|000026d0| 4d 5f 46 69 6c 74 65 72 | 46 75 6e 63 2c 26 6d 79 |M_Filter|Func,&my|
|000026e0| 68 6f 6f 6b 20 20 20 20 | 20 20 20 20 20 20 20 20 |hook | |
|000026f0| 20 20 20 20 20 20 20 20 | 3b 20 53 65 74 20 68 6f | |; Set ho|
|00002700| 6f 6b 20 66 6f 72 20 74 | 68 69 73 20 66 75 6e 63 |ok for t|his func|
|00002710| 74 69 6f 6e 00 53 4d 52 | 74 61 67 73 28 31 37 29 |tion.SMR|tags(17)|
|00002720| 5c 74 69 5f 54 61 67 3d | 23 54 41 47 5f 45 4e 44 |\ti_Tag=|#TAG_END|
|00002730| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002740| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002750| 20 20 20 20 20 3b 20 45 | 6e 64 20 6f 66 20 74 61 | ; E|nd of ta|
|00002760| 67 20 6c 69 73 74 00 00 | 3b 20 49 6e 69 74 69 61 |g list..|; Initia|
|00002770| 6c 69 73 65 20 61 6e 64 | 20 61 6c 6c 6f 63 61 74 |lise and| allocat|
|00002780| 65 20 61 20 72 65 71 75 | 65 73 74 65 72 20 66 6f |e a requ|ester fo|
|00002790| 72 20 74 68 65 20 73 63 | 72 65 65 6e 6d 6f 64 65 |r the sc|reenmode|
|000027a0| 00 2a 73 72 65 71 2e 53 | 63 72 65 65 6e 4d 6f 64 |.*sreq.S|creenMod|
|000027b0| 65 52 65 71 75 65 73 74 | 65 72 3d 30 00 2a 73 72 |eRequest|er=0.*sr|
|000027c0| 65 71 3d fb 84 28 23 41 | 53 4c 5f 53 63 72 65 65 |eq=..(#A|SL_Scree|
|000027d0| 6e 4d 6f 64 65 52 65 71 | 75 65 73 74 2c 26 53 4d |nModeReq|uest,&SM|
|000027e0| 52 74 61 67 73 28 30 29 | 5c 74 69 5f 54 61 67 29 |Rtags(0)|\ti_Tag)|
|000027f0| 00 00 3b 20 44 69 73 70 | 6c 61 79 20 74 68 65 20 |..; Disp|lay the |
|00002800| 72 65 71 75 65 73 74 65 | 72 00 6f 6b 2e 62 3d fb |requeste|r.ok.b=.|
|00002810| 86 28 2a 73 72 65 71 2c | 26 53 4d 52 74 61 67 73 |.(*sreq,|&SMRtags|
|00002820| 28 30 29 5c 74 69 5f 54 | 61 67 29 00 00 3b 20 49 |(0)\ti_T|ag)..; I|
|00002830| 66 20 74 68 65 20 72 65 | 74 75 72 6e 20 76 61 6c |f the re|turn val|
|00002840| 75 65 20 77 61 73 20 6e | 6f 74 20 30 20 28 74 68 |ue was n|ot 0 (th|
|00002850| 65 72 65 66 6f 72 65 20 | 61 20 73 75 63 63 65 73 |erefore |a succes|
|00002860| 73 29 00 80 0b 20 6f 6b | 3c 3e 30 00 20 20 20 20 |s)... ok|<>0. |
|00002870| 3b 20 44 69 73 70 6c 61 | 79 20 74 68 65 20 72 65 |; Displa|y the re|
|00002880| 74 75 72 6e 65 64 20 76 | 61 6c 75 65 73 20 69 6e |turned v|alues in|
|00002890| 20 74 68 65 20 73 74 72 | 75 63 74 75 72 65 20 61 | the str|ucture a|
|000028a0| 6c 6c 6f 63 61 74 65 64 | 20 65 61 72 6c 69 65 72 |llocated| earlier|
|000028b0| 00 20 20 20 20 3b 20 61 | 6e 64 20 77 61 69 74 20 |. ; a|nd wait |
|000028c0| 66 6f 72 20 33 20 73 65 | 63 6f 6e 64 73 00 20 20 |for 3 se|conds. |
|000028d0| 20 20 dd 82 20 2a 73 72 | 65 71 5c 73 6d 5f 44 69 | .. *sr|eq\sm_Di|
|000028e0| 73 70 6c 61 79 49 44 00 | 20 20 20 20 dd 82 20 2a |splayID.| .. *|
|000028f0| 73 72 65 71 5c 73 6d 5f | 44 69 73 70 6c 61 79 57 |sreq\sm_|DisplayW|
|00002900| 69 64 74 68 00 20 20 20 | 20 dd 82 20 2a 73 72 65 |idth. | .. *sre|
|00002910| 71 5c 73 6d 5f 44 69 73 | 70 6c 61 79 48 65 69 67 |q\sm_Dis|playHeig|
|00002920| 68 74 00 20 20 20 20 fe | 1b 20 31 35 30 00 80 c0 |ht. .|. 150...|
|00002930| 00 80 0b 20 28 2a 73 72 | 65 71 29 20 80 21 20 fb |... (*sr|eq) .! .|
|00002940| 85 28 2a 73 72 65 71 29 | 20 20 3b 20 49 66 20 74 |.(*sreq)| ; If t|
|00002950| 68 65 20 73 63 72 65 65 | 6e 6d 6f 64 65 20 61 6c |he scree|nmode al|
|00002960| 6c 6f 63 61 74 69 6f 6e | 20 73 75 63 63 65 65 64 |location| succeed|
|00002970| 65 64 2c 20 74 68 65 6e | 20 66 72 65 65 20 74 68 |ed, then| free th|
|00002980| 65 61 6c 6c 6f 63 61 74 | 65 64 20 6d 65 6d 6f 72 |eallocat|ed memor|
|00002990| 79 00 00 00 3b 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |y...;***|********|
|000029a0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000029b0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000029c0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000029d0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 00 3b |********|******.;|
|000029e0| 20 54 68 69 73 20 69 73 | 20 74 68 65 20 46 75 6e | This is| the Fun|
|000029f0| 63 74 69 6f 6e 20 74 68 | 61 74 20 74 68 65 20 68 |ction th|at the h|
|00002a00| 6f 6f 6b 20 77 69 6c 6c | 20 63 61 6c 6c 2e 20 20 |ook will| call. |
|00002a10| 50 75 74 20 74 68 65 20 | 6c 61 62 65 6c 20 62 65 |Put the |label be|
|00002a20| 66 6f 72 65 00 3b 20 74 | 68 65 20 53 74 61 74 65 |fore.; t|he State|
|00002a30| 6d 65 6e 74 2f 46 75 6e | 63 74 69 6f 6e 20 79 6f |ment/Fun|ction yo|
|00002a40| 75 20 77 61 6e 74 20 54 | 6f 20 6a 75 6d 70 20 54 |u want T|o jump T|
|00002a50| 6f 2e 20 4e 6f 74 65 20 | 74 68 61 74 20 79 6f 75 |o. Note |that you|
|00002a60| 20 6e 65 65 64 20 74 6f | 20 70 75 74 00 3b 20 52 | need to| put.; R|
|00002a70| 75 6e 6e 65 72 72 73 6f | 66 66 20 61 6e 64 20 52 |unnerrso|ff and R|
|00002a80| 75 6e 65 72 72 73 6f 6e | 20 61 72 6f 75 6e 64 20 |unerrson| around |
|00002a90| 74 68 65 20 73 74 61 74 | 65 6d 65 6e 74 20 6f 72 |the stat|ement or|
|00002aa0| 20 66 75 6e 63 74 69 6f | 6e 2e 00 3b 00 3b 20 49 | functio|n..;.; I|
|00002ab0| 6e 20 74 68 69 73 20 69 | 6d 70 6c 65 6d 65 6e 74 |n this i|mplement|
|00002ac0| 61 74 69 6f 6e 2c 20 74 | 68 65 20 41 53 4c 20 73 |ation, t|he ASL s|
|00002ad0| 63 72 65 65 6e 6d 6f 64 | 65 20 72 65 71 75 65 73 |creenmod|e reques|
|00002ae0| 74 65 72 20 75 73 65 73 | 20 61 20 68 6f 6f 6b 20 |ter uses| a hook |
|00002af0| 74 6f 20 64 65 63 69 64 | 65 00 3b 20 77 68 69 63 |to decid|e.; whic|
|00002b00| 68 20 73 63 72 65 65 6e | 6d 6f 64 65 73 20 74 6f |h screen|modes to|
|00002b10| 20 64 69 73 70 6c 61 79 | 20 69 6e 20 74 68 65 20 | display| in the |
|00002b20| 73 65 6c 65 63 74 69 6f | 6e 20 6c 69 73 74 2e 20 |selectio|n list. |
|00002b30| 54 68 69 73 20 66 75 6e | 63 74 69 6f 6e 20 72 65 |This fun|ction re|
|00002b40| 74 75 72 6e 73 00 3b 20 | 74 72 75 65 20 66 6f 72 |turns.; |true for|
|00002b50| 20 41 53 4c 20 74 6f 20 | 64 69 73 70 6c 61 79 20 | ASL to |display |
|00002b60| 74 68 65 20 73 63 72 65 | 65 6e 6d 6f 64 65 20 61 |the scre|enmode a|
|00002b70| 6e 64 20 66 61 6c 73 65 | 20 74 6f 20 6e 6f 74 20 |nd false| to not |
|00002b80| 64 69 73 70 6c 61 79 20 | 74 68 65 20 73 63 72 65 |display |the scre|
|00002b90| 65 6e 6d 6f 64 65 2e 00 | 3b 20 54 68 65 20 68 6f |enmode..|; The ho|
|00002ba0| 6f 6b 20 28 61 6e 64 20 | 74 68 65 72 65 66 6f 72 |ok (and |therefor|
|00002bb0| 65 20 74 68 69 73 20 66 | 75 6e 63 74 69 6f 6e 29 |e this f|unction)|
|00002bc0| 20 61 72 65 20 63 61 6c | 6c 65 64 20 66 6f 72 20 | are cal|led for |
|00002bd0| 65 76 65 72 79 20 73 63 | 72 65 65 6e 6d 6f 64 65 |every sc|reenmode|
|00002be0| 20 74 68 61 74 00 3b 20 | 41 53 4c 20 73 63 72 65 | that.; |ASL scre|
|00002bf0| 65 6e 6d 6f 64 65 20 72 | 65 71 75 65 73 74 65 72 |enmode r|equester|
|00002c00| 20 66 69 6e 64 73 2e 00 | 80 d3 00 68 6f 6f 6b 66 | finds..|...hookf|
|00002c10| 75 6e 63 3a 00 80 09 2e | 6c 20 68 6f 6f 6b 7b 2a |unc:....|l hook{*|
|00002c20| 64 61 68 6f 6f 6b 2e 48 | 6f 6f 6b 2c 20 2a 73 6d |dahook.H|ook, *sm|
|00002c30| 72 2e 53 63 72 65 65 6e | 4d 6f 64 65 52 65 71 75 |r.Screen|ModeRequ|
|00002c40| 65 73 74 65 72 2c 20 6d | 6f 64 65 49 44 2e 6c 7d |ester, m|odeID.l}|
|00002c50| 00 20 20 20 20 80 33 2e | 44 69 73 70 6c 61 79 49 |. .3.|DisplayI|
|00002c60| 6e 66 6f 20 20 20 44 69 | 73 49 6e 66 6f 42 75 66 |nfo Di|sInfoBuf|
|00002c70| 20 3b 20 42 75 66 66 65 | 72 20 74 6f 20 72 65 63 | ; Buffe|r to rec|
|00002c80| 65 69 76 65 20 69 6e 66 | 6f 72 6d 61 74 69 6f 6e |eive inf|ormation|
|00002c90| 20 61 62 6f 75 74 20 6d | 6f 64 65 20 64 69 73 70 | about m|ode disp|
|00002ca0| 6c 61 79 00 20 20 20 20 | 80 33 2e 44 69 6d 65 6e |lay. |.3.Dimen|
|00002cb0| 73 69 6f 6e 49 6e 66 6f | 20 44 69 6d 49 6e 66 6f |sionInfo| DimInfo|
|00002cc0| 42 75 66 20 3b 20 42 75 | 66 66 65 72 20 74 6f 20 |Buf ; Bu|ffer to |
|00002cd0| 72 65 63 65 69 76 65 20 | 69 6e 66 6f 72 6d 61 74 |receive |informat|
|00002ce0| 69 6f 6e 20 61 62 6f 75 | 74 20 6d 6f 64 65 20 64 |ion abou|t mode d|
|00002cf0| 69 6d 65 6e 73 69 6f 6e | 73 00 20 20 20 20 80 33 |imension|s. .3|
|00002d00| 2e 4d 6f 6e 69 74 6f 72 | 49 6e 66 6f 20 20 20 4d |.Monitor|Info M|
|00002d10| 6f 6e 49 6e 66 6f 42 75 | 66 20 3b 20 42 75 66 66 |onInfoBu|f ; Buff|
|00002d20| 65 72 20 74 6f 20 72 65 | 63 65 69 76 65 20 69 6e |er to re|ceive in|
|00002d30| 66 6f 72 6d 61 74 69 6f | 6e 20 61 62 6f 75 74 20 |formatio|n about |
|00002d40| 6d 6f 6e 69 74 6f 72 20 | 28 64 72 69 76 65 72 29 |monitor |(driver)|
|00002d50| 00 20 20 20 20 80 33 2e | 4e 61 6d 65 49 6e 66 6f |. .3.|NameInfo|
|00002d60| 20 20 20 20 20 20 4e 61 | 6d 49 6e 66 6f 42 75 66 | Na|mInfoBuf|
|00002d70| 20 3b 20 42 75 66 66 65 | 72 20 74 6f 20 72 65 63 | ; Buffe|r to rec|
|00002d80| 65 69 76 65 20 69 6e 66 | 6f 72 6d 61 74 69 6f 6e |eive inf|ormation|
|00002d90| 20 61 62 6f 75 74 20 6d | 6f 64 65 20 6e 61 6d 65 | about m|ode name|
|00002da0| 00 00 20 20 20 20 3b 20 | 47 65 74 73 20 61 20 68 |.. ; |Gets a h|
|00002db0| 61 6e 64 6c 65 20 74 6f | 20 61 20 72 65 63 6f 72 |andle to| a recor|
|00002dc0| 64 20 6f 66 20 64 69 73 | 70 6c 61 79 20 69 6e 66 |d of dis|play inf|
|00002dd0| 6f 72 6d 61 74 69 6f 6e | 20 66 6f 72 20 74 68 65 |ormation| for the|
|00002de0| 20 73 63 72 65 65 6e 6d | 6f 64 65 20 69 6e 20 71 | screenm|ode in q|
|00002df0| 75 65 73 74 69 6f 6e 00 | 20 20 20 20 49 44 68 61 |uestion.| IDha|
|00002e00| 6e 64 6c 65 2e 6c 3d ff | 75 28 6d 6f 64 65 49 44 |ndle.l=.|u(modeID|
|00002e10| 29 00 20 20 20 20 3b 20 | 46 69 6c 6c 20 69 6e 20 |). ; |Fill in |
|00002e20| 74 68 65 20 76 61 72 69 | 6f 75 73 20 62 75 66 66 |the vari|ous buff|
|00002e30| 65 72 73 20 61 62 6f 75 | 74 20 74 68 69 73 20 73 |ers abou|t this s|
|00002e40| 63 72 65 65 6e 6d 6f 64 | 65 2c 20 75 73 69 6e 67 |creenmod|e, using|
|00002e50| 20 74 68 65 20 6e 65 77 | 6c 79 00 20 20 20 20 3b | the new|ly. ;|
|00002e60| 20 67 6f 74 74 65 6e 20 | 68 61 6e 64 6c 65 00 20 | gotten |handle. |
|00002e70| 20 20 20 ff 77 20 49 44 | 68 61 6e 64 6c 65 2c 26 | .w ID|handle,&|
|00002e80| 44 69 73 49 6e 66 6f 42 | 75 66 2c 80 2f 2e 44 69 |DisInfoB|uf,./.Di|
|00002e90| 73 70 6c 61 79 49 6e 66 | 6f 2c 23 44 54 41 47 5f |splayInf|o,#DTAG_|
|00002ea0| 44 49 53 50 2c 30 00 20 | 20 20 20 ff 77 20 49 44 |DISP,0. | .w ID|
|00002eb0| 68 61 6e 64 6c 65 2c 26 | 44 69 6d 49 6e 66 6f 42 |handle,&|DimInfoB|
|00002ec0| 75 66 2c 80 2f 2e 44 69 | 6d 65 6e 73 69 6f 6e 49 |uf,./.Di|mensionI|
|00002ed0| 6e 66 6f 2c 23 44 54 41 | 47 5f 44 49 4d 53 2c 30 |nfo,#DTA|G_DIMS,0|
|00002ee0| 00 20 20 20 20 ff 77 20 | 49 44 68 61 6e 64 6c 65 |. .w |IDhandle|
|00002ef0| 2c 26 4d 6f 6e 49 6e 66 | 6f 42 75 66 2c 80 2f 2e |,&MonInf|oBuf,./.|
|00002f00| 4d 6f 6e 69 74 6f 72 49 | 6e 66 6f 2c 23 44 54 41 |MonitorI|nfo,#DTA|
|00002f10| 47 5f 4d 4e 54 52 2c 30 | 00 20 20 20 20 ff 77 20 |G_MNTR,0|. .w |
|00002f20| 49 44 68 61 6e 64 6c 65 | 2c 26 4e 61 6d 49 6e 66 |IDhandle|,&NamInf|
|00002f30| 6f 42 75 66 2c 80 2f 2e | 4e 61 6d 65 49 6e 66 6f |oBuf,./.|NameInfo|
|00002f40| 2c 23 44 54 41 47 5f 4e | 41 4d 45 2c 30 00 00 20 |,#DTAG_N|AME,0.. |
|00002f50| 20 20 20 3b 20 44 6f 20 | 74 65 73 74 73 2e 20 54 | ; Do |tests. T|
|00002f60| 72 75 65 3d 4d 6f 64 65 | 20 69 73 20 76 61 6c 69 |rue=Mode| is vali|
|00002f70| 64 2c 20 46 61 6c 73 65 | 3d 6d 6f 64 65 20 69 73 |d, False|=mode is|
|00002f80| 20 69 6e 76 61 6c 69 64 | 2e 20 49 6e 20 74 68 65 | invalid|. In the|
|00002f90| 73 65 20 74 65 73 74 2c | 20 61 6e 79 20 6d 6f 64 |se test,| any mod|
|00002fa0| 65 00 20 20 20 20 3b 20 | 77 69 74 68 20 61 20 6d |e. ; |with a m|
|00002fb0| 61 78 69 6d 75 6d 20 68 | 6f 72 69 7a 6f 6e 74 61 |aximum h|orizonta|
|00002fc0| 6c 20 77 69 64 74 68 20 | 6f 66 20 6c 65 73 73 20 |l width |of less |
|00002fd0| 74 68 61 6e 20 34 30 30 | 20 69 73 20 72 65 6a 65 |than 400| is reje|
|00002fe0| 63 74 65 64 20 28 69 2e | 65 2e 20 50 41 4c 20 61 |cted (i.|e. PAL a|
|00002ff0| 6e 64 00 20 20 20 20 3b | 20 4e 54 53 43 20 4c 6f |nd. ;| NTSC Lo|
|00003000| 77 72 65 73 20 6d 6f 64 | 65 73 29 00 20 20 20 20 |wres mod|es). |
|00003010| 80 0b 20 44 69 6d 49 6e | 66 6f 42 75 66 5c 4e 6f |.. DimIn|foBuf\No|
|00003020| 6d 69 6e 61 6c 5c 4d 61 | 78 58 20 3c 20 34 30 30 |minal\Ma|xX < 400|
|00003030| 00 20 20 20 20 20 20 20 | 20 80 09 20 80 07 20 bc |. | .. .. .|
|00003040| 0f 00 20 20 20 20 80 22 | 00 20 20 20 20 20 20 20 |.. ."|. |
|00003050| 20 80 09 20 80 07 20 bc | 0e 00 20 20 20 20 80 02 | .. .. .|.. ..|
|00003060| 20 80 0b 00 80 02 20 80 | 09 00 80 d2 00 3b 2a 2a | ..... .|.....;**|
|00003070| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00003080| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00003090| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000030a0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000030b0| 2a 2a 2a 2a 2a 2a 2a 00 | 00 00 3b 2a 2a 2a 2a 2a |*******.|..;*****|
|000030c0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000030d0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000030e0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000030f0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00003100| 2a 2a 2a 2a 00 80 05 20 | 48 6f 6f 6b 53 6b 69 70 |****... |HookSkip|
|00003110| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003120| 20 20 20 20 20 20 20 3b | 20 54 68 69 73 20 69 73 | ;| This is|
|00003130| 20 64 6f 6e 65 20 73 6f | 20 74 68 61 74 20 68 6f | done so| that ho|
|00003140| 6f 6b 20 63 6f 64 65 20 | 64 6f 65 73 20 6e 6f 74 |ok code |does not|
|00003150| 20 67 65 74 00 20 20 20 | 20 20 20 20 20 20 20 20 | get. | |
|00003160| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003170| 20 20 20 20 20 20 20 20 | 20 3b 20 65 78 65 63 75 | | ; execu|
|00003180| 74 65 64 20 6f 75 74 20 | 6f 66 20 70 6c 61 63 65 |ted out |of place|
|00003190| 00 5f 68 6f 6f 6b 45 6e | 74 72 79 3a 00 20 20 20 |._hookEn|try:. |
|000031a0| 20 80 82 2e 6c 20 64 32 | 2f 61 35 2c 2d 28 61 37 | ...l d2|/a5,-(a7|
|000031b0| 29 20 20 20 20 20 20 20 | 3b 20 50 72 65 73 65 72 |) |; Preser|
|000031c0| 76 65 20 6e 6f 6e 2d 73 | 63 72 61 74 63 68 20 72 |ve non-s|cratch r|
|000031d0| 65 67 69 73 74 65 72 73 | 20 77 65 20 61 6c 74 65 |egisters| we alte|
|000031e0| 72 00 20 20 20 20 80 7e | 2e 6c 20 20 61 31 2c 64 |r. .~|.l a1,d|
|000031f0| 32 20 20 20 20 20 20 20 | 20 20 20 20 20 20 3b 20 |2 | ; |
|00003200| 4d 61 6b 65 20 74 68 65 | 20 6d 65 73 73 61 67 65 |Make the| message|
|00003210| 20 74 68 65 20 74 68 69 | 72 64 20 70 61 72 61 6d | the thi|rd param|
|00003220| 65 74 65 72 00 20 20 20 | 20 80 7e 2e 6c 20 20 61 |eter. | .~.l a|
|00003230| 32 2c 64 31 20 20 20 20 | 20 20 20 20 20 20 20 20 |2,d1 | |
|00003240| 20 3b 20 54 68 65 20 6f | 62 6a 65 63 74 20 69 73 | ; The o|bject is|
|00003250| 20 74 68 65 20 73 65 63 | 6f 6e 64 20 70 61 72 61 | the sec|ond para|
|00003260| 6d 65 74 65 72 00 20 20 | 20 20 80 7e 2e 6c 20 20 |meter. | .~.l |
|00003270| 61 30 2c 64 30 20 20 20 | 20 20 20 20 20 20 20 20 |a0,d0 | |
|00003280| 20 20 3b 20 54 68 65 20 | 68 6f 6f 6b 20 69 73 20 | ; The |hook is |
|00003290| 74 68 65 20 66 69 72 73 | 74 20 70 61 72 61 6d 65 |the firs|t parame|
|000032a0| 74 65 72 00 20 20 20 20 | 80 7e 2e 6c 20 20 67 6c |ter. |.~.l gl|
|000032b0| 6f 62 61 6c 62 61 73 65 | 28 70 63 29 2c 61 35 20 |obalbase|(pc),a5 |
|000032c0| 3b 20 72 65 73 74 6f 72 | 65 20 6f 75 72 20 67 6c |; restor|e our gl|
|000032d0| 6f 62 61 6c 20 76 61 72 | 69 61 62 6c 65 20 62 61 |obal var|iable ba|
|000032e0| 73 65 00 20 20 20 20 80 | 7e 2e 6c 20 20 31 32 28 |se. .|~.l 12(|
|000032f0| 61 30 29 2c 61 30 20 20 | 20 20 20 20 20 20 20 3b |a0),a0 | ;|
|00003300| 20 67 65 74 20 70 6f 69 | 6e 74 65 72 20 74 6f 20 | get poi|nter to |
|00003310| 68 69 67 68 20 6c 65 76 | 65 6c 20 6c 61 6e 67 75 |high lev|el langu|
|00003320| 61 67 65 20 66 75 6e 63 | 74 69 6f 6e 00 20 20 20 |age func|tion. |
|00003330| 20 80 79 20 20 20 20 20 | 36 28 61 30 29 20 20 20 | .y |6(a0) |
|00003340| 20 20 20 20 20 20 20 20 | 20 20 3b 20 63 61 6c 6c | | ; call|
|00003350| 20 74 68 65 20 68 69 67 | 68 20 6c 65 76 65 6c 20 | the hig|h level |
|00003360| 6c 61 6e 67 75 61 67 65 | 20 66 75 6e 63 74 69 6f |language| functio|
|00003370| 6e 00 20 20 20 20 80 82 | 2e 6c 20 28 61 37 29 2b |n. ..|.l (a7)+|
|00003380| 2c 64 32 2f 61 35 20 20 | 20 20 20 20 20 3b 20 52 |,d2/a5 | ; R|
|00003390| 65 73 74 6f 72 65 20 6e | 6f 6e 2d 73 63 72 61 74 |estore n|on-scrat|
|000033a0| 63 68 20 72 65 67 69 73 | 74 65 72 73 20 77 65 20 |ch regis|ters we |
|000033b0| 61 6c 74 65 72 65 64 00 | 20 20 20 20 80 94 00 67 |altered.| ...g|
|000033c0| 6c 6f 62 61 6c 62 61 73 | 65 3a 20 80 26 2e 6c 20 |lobalbas|e: .&.l |
|000033d0| 31 20 20 20 20 20 20 20 | 20 20 20 20 20 3b 20 53 |1 | ; S|
|000033e0| 6f 6d 65 20 73 70 61 63 | 65 20 66 6f 72 20 70 72 |ome spac|e for pr|
|000033f0| 65 73 65 72 76 69 6e 67 | 20 67 6c 6f 62 61 6c 20 |eserving| global |
|00003400| 76 61 72 69 61 62 6c 65 | 20 62 61 73 65 00 00 48 |variable| base..H|
|00003410| 6f 6f 6b 53 6b 69 70 00 | 80 02 00 00 |ookSkip.|.... |
+--------+-------------------------+-------------------------+--------+--------+